protected override void __evt_CTCP(NetworkCTCPEventArgs args) { switch (args.CTCP) { case "FINGER": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "FINGER" + " I am a bot, don't finger me"); return; case "TIME": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "TIME " + DateTime.Now.ToString()); return; case "PING": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "PING" + args.Message.Substring( args.Message.IndexOf(_Protocol.Separator + "PING") + 5)); return; case "VERSION": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "VERSION " + Configuration.System.Version + " http://meta.wikimedia.org/wiki/wm-bot"); return; } Syslog.DebugLog("Ignoring unknown CTCP from " + args.Source + ": " + args.CTCP + args.Message); }
public override void __evt_CTCP(NetworkCTCPEventArgs args) { switch (args.CTCP) { case "FINGER": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "FINGER" + " I am a bot don't finger me"); return; case "TIME": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "TIME " + DateTime.Now.ToString()); return; case "PING": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "PING" + args.Message.Substring( args.Message.IndexOf(_Protocol.Separator + "PING") + 5)); return; case "VERSION": Transfer("NOTICE " + args.SourceInfo.Nick + " :" + _Protocol.Separator + "VERSION " + Configuration.System.Version + " http://meta.wikimedia.org/wiki/WM-Bot"); return; } Syslog.DebugLog("Ignoring uknown CTCP from " + args.Source + ": " + args.CTCP + args.Message); }
protected internal virtual void __evt_CTCP(NetworkCTCPEventArgs args) { if (this.On_CTCP != null) this.On_CTCP(this, args); }