示例#1
0
        private void cmdTOPIC(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];
            string         topic    = UtilityService.JoinString(args, 3, args.Length).Remove(0, 1);
            TopicEventArgs e        = new TopicEventArgs(user, topic, channel);

            oTopicEvent(this, e);
        }
示例#2
0
        private void cmd332(string[] args)
        {
            _Parsed = true;
            string topic   = "";
            string channel = "";

            if (args[3].IndexOf("#") > -1 || args[3].IndexOf("&") > -1)
            {
                topic   = UtilityService.JoinString(args, 4, args.Length).Trim(new char[] { ':' });
                channel = args[3];
            }
            else
            {
                topic   = UtilityService.JoinString(args, 3, args.Length).Trim(new char[] { ':' });
                channel = args[2];
            }
            TopicEventArgs e = new TopicEventArgs(null, topic, channel);

            oTopicEvent(this, e);
        }
示例#3
0
        void  iparse_oTopicEvent(object sendere, TopicEventArgs e)
        {
            //First get channel from channellist.
            //then set the topic.
            place = 5;
            ChanMessageList cml;
            string          scChannel = StripPND(e.Channel);

            if (!ChannelList.TryGetValue(scChannel, out cml))
            {
                cml = new ChanMessageList();
                ChannelList.Add(scChannel, cml);
            }
            if (e.Topic.Length == 0)
            {
                cml.Topic = "Topic not set.";
            }
            else
            {
                cml.Topic = e.Topic;
            }

            cml.TopicUser = e.User;
            if (selectedChannel == scChannel)
            {
                if (e.User != null)
                {
                    rtbTopic.Text = e.User.Nick + "\n";
                }
                rtbTopic.Clear();
                rtbTopic.AppendText(e.Topic);
            }


            //throw new NotImplementedException();
        }
示例#4
0
 private void cmdTOPIC(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];
     string topic = UtilityService.JoinString(args, 3, args.Length).Remove(0, 1);
     TopicEventArgs e = new TopicEventArgs(user, topic, channel);
     oTopicEvent(this, e);
     
 }
示例#5
0
 private void cmd332(string[] args)
 {
     _Parsed = true;
     string topic = "";
     string channel = "";
     if (args[3].IndexOf("#") > -1 || args[3].IndexOf("&") > -1)
     {
         topic = UtilityService.JoinString(args, 4, args.Length).Trim(new char[] { ':' });
         channel = args[3];
     }
     else
     {
         topic = UtilityService.JoinString(args, 3, args.Length).Trim(new char[] { ':' });
         channel = args[2];
     }
     TopicEventArgs e = new TopicEventArgs(null, topic, channel);
     oTopicEvent(this, e);
     
 }
示例#6
0
文件: MainForm.cs 项目: foxjazz/IRCAL
        void  iparse_oTopicEvent(object sendere, TopicEventArgs e)
        {
            //First get channel from channellist.
            //then set the topic.
            place = 5;
            ChanMessageList cml;
            string scChannel = StripPND(e.Channel);

            if (!ChannelList.TryGetValue(scChannel, out cml))
            {
                cml = new ChanMessageList();
                ChannelList.Add(scChannel, cml);
            }
            if (e.Topic.Length == 0)
                cml.Topic = "Topic not set.";
            else
                cml.Topic = e.Topic;

            cml.TopicUser = e.User;
            if (selectedChannel == scChannel)
            {
                if (e.User != null)
                {
                    rtbTopic.Text = e.User.Nick + "\n";
                }
                rtbTopic.Clear();
                rtbTopic.AppendText(e.Topic);
             
            }


     	        //throw new NotImplementedException();
        }