Exemplo n.º 1
0
        //ForwardEventArgs> :kubrick.freenode.net 470 foxjazz #csharp ##csharp :Forwarding to another channel
        private void cmd470(string[] args)
        {
            _Parsed = true;
            string names = UtilityService.JoinString(args, 5, args.Length).Trim(new char[] { ':' });

            string[] namelist = names.Split(' ');
            string   channel  = args[4];

            ForwardEventArgs e = new ForwardEventArgs(args[3], args[4]);

            // Sometimes, the 331 isn't sended by the server so we emit the channel joined event here
            //CORE.OnChannelJoinedReceived(channel);
            oForwardEvent(this, e);
        }
Exemplo n.º 2
0
        void iparse_oForwardEvent(object sender, ForwardEventArgs e)
        {
            //Here we need to be careful because we are forwarding a channel that was supposedly joined.
            //so we need to remove the joined channel and modify it
            string source = StripPND(e.sourceChannel);
            string target = StripPND(e.targetChannel);

            if (!ChannelList.ContainsKey(source))
            {
                return;
            }
            if (ChannelList.ContainsKey(target)) //we only need to do this once.
            {
                return;
            }
            ChannelList.Remove(source);

            TreeNode thisTN = null;

            foreach (TreeNode tnn in tvChans.Nodes)
            {
                if (tnn.Text == ircCore1.ServerName)
                {
                    thisTN = tnn;
                }
            }
            TreeNode ttn = new TreeNode();

            ttn.Text = target;
            ChanMessageList cml = new ChanMessageList();

            ttn.Tag = cml;
            thisTN.Nodes.Add(ttn);
            ChannelList.Add(target, cml);

            foreach (TreeNode tn2 in thisTN.Nodes)
            {
                if (tn2.Text == source)
                {
                    tn2.Remove();
                }
            }
        }
Exemplo n.º 3
0
        //ForwardEventArgs> :kubrick.freenode.net 470 foxjazz #csharp ##csharp :Forwarding to another channel
        private void cmd470(string[] args)
        {
            _Parsed = true;
            string names = UtilityService.JoinString(args, 5, args.Length).Trim(new char[] { ':' });
            
            string[] namelist = names.Split(' ');
            string channel = args[4];

            ForwardEventArgs e = new ForwardEventArgs(args[3], args[4]);
            // Sometimes, the 331 isn't sended by the server so we emit the channel joined event here
            //CORE.OnChannelJoinedReceived(channel);
            oForwardEvent(this, e);
        }
Exemplo n.º 4
0
        void iparse_oForwardEvent(object sender, ForwardEventArgs e)
        {
            //Here we need to be careful because we are forwarding a channel that was supposedly joined.
            //so we need to remove the joined channel and modify it
            string source = StripPND( e.sourceChannel);
            string target = StripPND(e.targetChannel);

            if (!ChannelList.ContainsKey(source))
                return;
            if (ChannelList.ContainsKey(target)) //we only need to do this once.
                return;
            ChannelList.Remove(source);

            TreeNode thisTN = null;
            foreach (TreeNode tnn in tvChans.Nodes)
            {
                if (tnn.Text == ircCore1.ServerName)
                    thisTN = tnn;
            }
            TreeNode ttn = new TreeNode();
            ttn.Text = target;
            ChanMessageList cml = new ChanMessageList();
            ttn.Tag = cml;
            thisTN.Nodes.Add(ttn);
            ChannelList.Add(target, cml);

            foreach (TreeNode tn2 in thisTN.Nodes)
            {
                if (tn2.Text == source)
                {
                    tn2.Remove();
                }
            }
        }