Ejemplo n.º 1
0
        /// <summary>
        /// Do chat message processing here
        /// Messages sent to this method aren't filtered
        /// </summary>
        /// <param name="msg"></param>
        static bool ProcessChatCommand(string msg, RelaySession session)
        {
            bool result = false;

            if (Global.EnableChatCommands && msg.StartsWith("."))
            {
                if (msg.StartsWith(".penis"))
                {
                    string[] split = msg.Split(' ');
                    if (split.Count() == 2 && split[1].Length <= 16)
                    {
                        session.SendClientPM("Длинна письки " + split[1].Length + " см.");
                        result = true;
                    }
                }

                if (msg.StartsWith(".info"))
                {
                    session.SendClientPM("Software: Anticheat[sroprot]");
                    session.SendClientPM("Developers: Xoka && dwordptr");
                    session.SendClientPM("Special for: sairos-online.com");
                    session.SendClientPM("Version: " + Global.SoftVersion);
                    result = true;
                }

                if (msg.StartsWith(".server"))
                {
                    foreach (var str in Global.ServerInfo)
                    {
                        session.SendClientPM(str);
                    }
                    result = true;
                }

                if (msg.StartsWith(".schedule"))
                {
                    foreach (var str in Global.ServerSchedule)
                    {
                        session.SendClientPM(str);
                    }
                    result = true;
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        static bool AbuseFilter(string msg, RelaySession session)
        {
            bool result = false;

            if (Global.EnableAbuseFilter)
            {
                //Убираемт  не нужные символы
                foreach (var ch in s_ForbiddenAbuseChars)
                {
                    msg = msg.Replace(ch, "").ToLower();
                }
                foreach (var word in Global.AbuseWord)
                {
                    if (msg.Contains(word))
                    {
                        session.SendClientPM("Некоторые выражение запрещены в игровом чате");
                        result = true;
                    }
                }
            }

            return(result);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Do chat message processing here
        /// Messages sent to this method aren't filtered
        /// </summary>
        /// <param name="msg"></param>
        static bool ProcessChatCommand(string msg, RelaySession session)
        {
            bool result = false;
            if (Global.EnableChatCommands && msg.StartsWith("."))
            {
                if (msg.StartsWith(".penis"))
                {
                    string[] split = msg.Split(' ');
                    if (split.Count() == 2 && split[1].Length <= 16)
                    {
                        session.SendClientPM("Длинна письки " + split[1].Length + " см.");
                        result = true;
                    }
                }

                if (msg.StartsWith(".info"))
                {
                    session.SendClientPM("Software: Anticheat[sroprot]");
                    session.SendClientPM("Developers: Xoka && dwordptr");
                    session.SendClientPM("Special for: sairos-online.com");
                    session.SendClientPM("Version: "+ Global.SoftVersion);
                    result = true;
                }

                if (msg.StartsWith(".server"))
                {
                   foreach(var str in Global.ServerInfo)
                    {
                        session.SendClientPM(str);
                    }
                    result = true;
                }

                if (msg.StartsWith(".schedule"))
                {
                    foreach (var str in Global.ServerSchedule)
                    {
                        session.SendClientPM(str);
                    }
                    result = true;
                }
            }
            return result;
        }
Ejemplo n.º 4
0
        static bool AbuseFilter(string msg, RelaySession session)
        {
            bool result = false;
            if (Global.EnableAbuseFilter)
            {
                //Убираемт  не нужные символы
                foreach (var ch in s_ForbiddenAbuseChars)
                {
                    msg = msg.Replace(ch, "").ToLower();
                }
                foreach (var word in Global.AbuseWord)
                {
                    if (msg.Contains(word))
                    {
                        session.SendClientPM("Некоторые выражение запрещены в игровом чате");
                        result = true;
                    }
                }

            }

            return result;
        }