protected void OnCTCPTime(IrcClient sender, IrcEventArgs e) { if (config.CtcpTime) { Raw("NOTICE {0} :{1}TIME {2}{1}", Hostmask.ToNick(e.Sender), (char)1, DateTime.Now.ToString("F")); } }
protected void OnCtcpPing(IrcClient sender, IrcEventArgs e) { if (config.CtcpPing) { Raw("NOTICE {0} :{1}PING {2}{1}", Hostmask.ToNick(e.Sender), (char)1, e.Args[0].Split(' ').Last().TrimEnd((char)1)); } }
protected void OnPart(IrcClient sender, IrcEventArgs e) { if (Hostmask.ToNick(e.Sender) == sender.Nick) { //I left a channel Channels[e.Target].PerformSelfPart(sender, e); } else { Channels[e.Target].PerformPart(sender, e); } }
protected void OnJoin(IrcClient sender, IrcEventArgs e) { if (Hostmask.ToNick(e.Sender) == sender.Nick) { //I want to access Channels here //Console.WriteLine("Joined {0}", string.Join(" ", e.Args)); foreach (string chan in e.Args) { Channels[chan] = new Channel(this, chan); //TODO: Get users Channels[chan].PerformSelfJoin(sender, e); } } else { Channels[e.Args.First()].PerformJoin(this, e); } }
protected void OnCTCPVersion(IrcClient sender, IrcEventArgs e) { Raw("NOTICE {0} :{1}VERSION {2}{1}", Hostmask.ToNick(e.Sender), (char)1, config.Version); }