Esempio n. 1
0
        public void LeaveChannel(string channel)
        {
            var channels = channel.Split(',');

            foreach (var chan in channels)
            {
                if (ChannelsIn.Contains(chan))
                {
                    ChannelsIn.Remove(chan);
                }

                SendCommand(String.Format("PART {0}", chan));
            }
        }
Esempio n. 2
0
        private void IrcPart(string[] ircCommand)
        {
            string ircChannel = ircCommand[2];
            string ircUser    = ircCommand[0].Split('!')[0];

            if (ircUser == Nick && ChannelsIn.Contains(ircChannel))
            {
                ChannelsIn.Remove(ircChannel);
            }

            if (Part != null)
            {
                Part(ircChannel, ircUser);
            }
        }
Esempio n. 3
0
        private void IrcKick(string[] ircCommand)
        {
            string userKicker  = ircCommand[0].Split('!')[0];
            string userKicked  = ircCommand[3];
            string ircChannel  = ircCommand[2];
            string kickMessage = "";

            if (userKicked == Nick && ChannelsIn.Contains(ircChannel))
            {
                ChannelsIn.Remove(ircChannel);
            }

            for (int intI = 4; intI < ircCommand.Length; intI++)
            {
                kickMessage += ircCommand[intI] + " ";
            }
            if (Kick != null)
            {
                Kick(ircChannel, userKicker, userKicked, kickMessage.Remove(0, 1).Trim());
            }
        }