Пример #1
0
        void iparse_JoinEvent(object sender, JoinEventArgs e)
        {
            ChanMessageList cml;

            place = 53;

            string scChannel = StripPND(e.Channel);

            if (!ChannelList.TryGetValue(scChannel, out cml))
            {
                cml = new ChanMessageList();
                ChannelList.Add(scChannel, cml);
            }
            cml.AddName(e);
            if (scChannel == selectedChannel)
            {
                lbChanUsers.Items.Clear();
                lbChanUsers.BeginUpdate();
                foreach (string s in cml.nicks)
                {
                    lbChanUsers.Items.Add(s);
                }
                lbChanUsers.EndUpdate();
            }
        }
Пример #2
0
 internal void AddName(JoinEventArgs e)
 {
     if (_Nicks == null)
     {
         _Nicks = new List<string>();
     }
     if (!_Nicks.Contains(e.JoinedUser.Nick))
         _Nicks.Add(e.JoinedUser.Nick);
 }
Пример #3
0
 internal void AddName(JoinEventArgs e)
 {
     if (_Nicks == null)
     {
         _Nicks = new List <string>();
     }
     if (!_Nicks.Contains(e.JoinedUser.Nick))
     {
         _Nicks.Add(e.JoinedUser.Nick);
     }
 }
Пример #4
0
        private void cmdJOIN(string[] args)
        {
            _Parsed = true;
            string[]      source   = args[0].Split(new char[] { '!' });
            string        nick     = source[0].Replace(":", "");
            string        realname = source[1].Split(arobas)[0];
            string        hostname = source[1].Split(arobas)[1];
            UserInfo      user     = new UserInfo(nick, realname, hostname, false);
            string        channel  = args[2].Replace(":", "");
            JoinEventArgs e        = new JoinEventArgs(channel, user);

            if (oJoinEvent != null)
            {
                oJoinEvent(this, e);
            }
        }
Пример #5
0
        private void cmdQUIT(string[] args)
        {
            string[] source   = args[0].Split(new char[] { '!' });
            string   nick     = source[0].Replace(":", "");
            string   realname = source[1].Split(arobas)[0];
            string   hostname = source[1].Split(arobas)[1];
            UserInfo user     = new UserInfo(nick, realname, hostname, false);
            string   reason   = UtilityService.JoinString(args, 2, args.Length).Trim(new char[] { ':' });

            JoinEventArgs e = new JoinEventArgs("", user, reason);

            if (oQuitEvent != null)
            {
                oQuitEvent(this, e);
            }
            //connection.OnQuitCommandReceived(user, reason);
        }
Пример #6
0
 private void cmdJOIN(string[] args)
 {
     _Parsed = true;
     string[] source = args[0].Split(new char[] { '!' });
     string nick = source[0].Replace(":", "");
     string realname = source[1].Split(arobas)[0];
     string hostname = source[1].Split(arobas)[1];
     UserInfo user = new UserInfo(nick, realname, hostname, false);
     string channel = args[2].Replace(":", "");
     JoinEventArgs e = new JoinEventArgs(channel, user);
     if (oJoinEvent != null)
         oJoinEvent(this, e);
 }
Пример #7
0
        private void cmdQUIT(string[] args)
        {

            string[] source = args[0].Split(new char[] { '!' });
            string nick = source[0].Replace(":", "");
            string realname = source[1].Split(arobas)[0];
            string hostname = source[1].Split(arobas)[1];
            UserInfo user = new UserInfo(nick, realname, hostname, false);
            string reason = UtilityService.JoinString(args, 2, args.Length).Trim(new char[] { ':' });

            JoinEventArgs e = new JoinEventArgs("", user,reason);
            if (oQuitEvent != null)
                oQuitEvent(this, e);
            //connection.OnQuitCommandReceived(user, reason);
        }
Пример #8
0
        void iparse_JoinEvent(object sender, JoinEventArgs e)
        {
            ChanMessageList cml;
            place = 53;

            string scChannel = StripPND(e.Channel);
            if (!ChannelList.TryGetValue(scChannel, out cml))
            {
                cml = new ChanMessageList();
                ChannelList.Add(scChannel, cml);
            }
            cml.AddName(e);
            if (scChannel == selectedChannel)
            {
                lbChanUsers.Items.Clear();
                lbChanUsers.BeginUpdate();
                foreach (string s in cml.nicks)
                {
                    lbChanUsers.Items.Add(s);
                }
                lbChanUsers.EndUpdate();
            }


        }