Пример #1
0
 public IrcLine Absorb(IrcLine line)
 {
     IrcLine clone = line.Clone ();
     Mask = clone.Mask;
     Method = clone.Method;
     Data = clone.Data;
     return this;
 }
Пример #2
0
 public void callCommand(string commandName, IrcLine line, string chan, string rest)
 {
     try {
         typeof(CommandHandler).GetMethod("cmd_"+commandName.Substring (Config.CmdPrefix.Length).ToUpper ()).Invoke(CmdHandler, new object[] {this, line.Mask.Nick, chan, rest});
     } catch (NullReferenceException) {
         Msg (line.Mask.Nick, "Unknown command "+commandName);
     }
 }
Пример #3
0
 public void onNumericMethod(string toCall, IrcLine line)
 {
     try {
         typeof(IrcBot).GetMethod (toCall.TrimWhitespace ()).Invoke (this, new object[] {line});
     } catch (NullReferenceException) {
         Console.WriteLine ("[WARNING] Numeric Method "+toCall+" not implemented (yet).");
     }
 }
Пример #4
0
 public void onNames(IrcLine iline)
 {
     string[] splitteddata = iline.Data.Split(":");
     string[] nicks = splitteddata[1].Split (" ");
     int length = iline.Data.IndexOf (":")-iline.Data.IndexOf ("#");
     string channelName = iline.Data.Substring (iline.Data.IndexOf("#"), length-1);
     Channels.Add (new IrcChannel(channelName, nicks.ToList ()));
     Console.WriteLine (Channels.Last().Identifier);
     Console.WriteLine (Channels.Last ().Contains.First ());
     /* Woo for IrcChannel Semantics! */
 }
Пример #5
0
 public bool Exec(string cmd, IrcLine iline)
 {
     return Write (cmd+" "+iline.Data);
 }