예제 #1
0
파일: IRCParser.cs 프로젝트: foxjazz/IRCAL
        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
파일: IRCParser.cs 프로젝트: foxjazz/IRCAL
        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
파일: IRCParser.cs 프로젝트: foxjazz/IRCAL
 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
파일: IRCParser.cs 프로젝트: foxjazz/IRCAL
 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();
        }