Example #1
0
        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);
        }
Example #2
0
 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);
 }
Example #3
0
 protected internal virtual void __evt_CTCP(NetworkCTCPEventArgs args)
 {
     if (this.On_CTCP != null)
         this.On_CTCP(this, args);
 }