Example #1
0
        public override void TimerExpired(int number, object data)
        {
            var Data = (KeyValuePair <IcPlayer, PlayerClass>)data;

            DA.Create2DSound(Data.Value.Sound);
            if (GameLogEnabled)
            {
                DALogManager.WriteGameLog($"_JOINSND {Data.Value.Name} {Data.Value.Sound}");
            }
        }
        public override void RenLogEvent(string output)
        {
            if (output.Length > 28)
            {
                if (output.Substring(0, 28).ToLower().Contains("connection broken to client."))
                {
                    int     ID     = int.Parse(output.Substring(28, output.Length - 28));
                    BPlayer Player = Find(ID);

                    if (!String.IsNullOrEmpty(Message))
                    {
                        DA.HostMessage(FormatText(Message, Player));
                    }
                    if (GameLogEnabled)
                    {
                        DALogManager.WriteGameLog($"_CONNLOST {Player.Name} {Player.ID} {Player.Serial} {Player.IP} {Player.GameVersion}");
                    }
                }
            }
        }