Пример #1
0
        public virtual void KickClient(IClient c, IClient kicker, string message)
        {
            if (!clients.Contains(c) || !(clients.Contains(kicker) && ClientModes[kicker].Contains('o')))
            {
                return;
            }

            SendMessage(c, IRCMessage.GetStatic().CreateMessage(kicker, kicker.UserString, "KICK", new string[] { "&" + ChannelName, c.NickName, message }), true);

            clients.Remove(c);
            ClientModes.Remove(c);
        }
Пример #2
0
        public virtual void RemoveClient(IClient c, string message)
        {
            if (!clients.Contains(c))
            {
                return;
            }

            SendMessage(c, IRCMessage.GetStatic().CreateMessage(c, c.UserString, "PART", new string[] { "&" + ChannelName, message }), true);

            if (!clients.Contains(c))
            {
                return;
            }

            clients.Remove(c);
            ClientModes.Remove(c);
        }