Пример #1
0
        public static void GlobalSendCommand(ChatCommand command, ChatUser initiator, string param1, string param2)
        {
            for (int i = 0; i < m_Users.Count; ++i)
            {
                ChatUser user = m_Users[i];

                if (user == initiator)
                {
                    continue;
                }

                if (user.CheckOnline())
                {
                    ChatSystem.SendCommandTo(user.m_Mobile, command, param1, param2);
                }
            }
        }
Пример #2
0
        public void SendCommand(ChatCommand command, ChatUser initiator, string param1, string param2)
        {
            for (int i = 0; i < m_Users.Count; ++i)
            {
                ChatUser user = (ChatUser)m_Users[i];

                if (user == initiator)
                {
                    continue;
                }

                if (user.CheckOnline())
                {
                    ChatSystem.SendCommandTo(user.Mobile, command, param1, param2);
                }
                else if (!Contains(user))
                {
                    --i;
                }
            }
        }
Пример #3
0
        public void SendIgnorableMessage(int number, ChatUser from, string param1, string param2)
        {
            for (int i = 0; i < m_Users.Count; ++i)
            {
                ChatUser user = (ChatUser)m_Users[i];

                if (user.IsIgnored(from))
                {
                    continue;
                }

                if (user.CheckOnline())
                {
                    user.SendMessage(number, from.Mobile, param1, param2);
                }
                else if (!Contains(user))
                {
                    --i;
                }
            }
        }
Пример #4
0
        public void SendMessage(int number, ChatUser initiator, string param1, string param2)
        {
            for (int i = 0; i < m_Users.Count; ++i)
            {
                ChatUser user = (ChatUser)m_Users[i];

                if (user == initiator)
                {
                    continue;
                }

                if (user.CheckOnline())
                {
                    user.SendMessage(number, param1, param2);
                }
                else if (!Contains(user))
                {
                    --i;
                }
            }
        }