Example #1
0
        public static void JoinFavorites(IRCCore icore, Dictionary <string, ChanMessageList> clist)

        {
            DataClass oData;
            DataTable dt = new DataTable();

            oData = DataClass.Instance;
            //SavedSet.ServerListDataTable dtSList;
            Dictionary <string, ChanFav> favlist = oData.GetFavoriteList(icore.ServerName);


            foreach (KeyValuePair <string, ChanFav> cf in  favlist)
            {
                if (!clist.ContainsKey(cf.Value.channel))
                {
                    icore.SendRaw("JOIN #" + cf.Value.channel);
                    ChanMessageList cml = new ChanMessageList();
                    cml.Channel = cf.Value.channel;
                    clist.Add(cf.Value.channel, cml);
                }
            }

            foreach (KeyValuePair <string, ChanMessageList> cvpair in clist)
            {
                if (!favlist.ContainsKey(cvpair.Value.Channel))
                {
                    icore.SendRaw("PART #" + cvpair.Value.Channel);
                }
            }
        }
Example #2
0
        public static void JoinFavorites(IRCCore icore, Dictionary<string,ChanMessageList> clist)
        
        {
            DataClass oData;
            DataTable dt = new DataTable();
            oData = DataClass.Instance;
            //SavedSet.ServerListDataTable dtSList;
            Dictionary<string,ChanFav> favlist = oData.GetFavoriteList(icore.ServerName);

            
            foreach (KeyValuePair<string,ChanFav> cf in  favlist)
            {
             
                if (!clist.ContainsKey(cf.Value.channel))
                {
                    icore.SendRaw("JOIN #" + cf.Value.channel);
                    ChanMessageList cml = new ChanMessageList();
                    cml.Channel = cf.Value.channel;
                    clist.Add(cf.Value.channel, cml);
                }

            }
            
            foreach (KeyValuePair<string, ChanMessageList> cvpair in clist)
            {
                if (!favlist.ContainsKey(cvpair.Value.Channel))
                {
                    icore.SendRaw("PART #" + cvpair.Value.Channel);
                }
            }
        }
Example #3
0
        private void rtbTalk_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                //privmsg #channel :messagePart

                if (rtbTalk.Text.StartsWith("/"))
                {
                    ircCore1.SendRaw(rtbTalk.Text.Substring(1));
                }
                else if (rtbTalk.Text.Length > 0)
                {
                    PrivMsgEventArgs nPME  = new PrivMsgEventArgs();
                    UserInfo         uinfo = new UserInfo();
                    uinfo.RealName = dc.GetName();
                    uinfo.Nick     = dc.GetNick();

                    rtbTalk.Text = rtbTalk.Text.Replace("\n", "");
                    rtbMsg.AppendText(rtbTalk.Text + "\n");

                    string nic = (string)lbPrivates.SelectedItem;
                    ircCore1.SendRaw("PRIVMSG #" + nic + " :" + rtbTalk.Text + "\r\n");
                }
                rtbTalk.Text       = "";
                e.SuppressKeyPress = true;
            }
        }
Example #4
0
 private void SendChannel(string msg)
 {
     botCore.SendRaw("PRIVMSG #" + selectedchannel + " :" + msg + "\r\n");
 }