示例#1
0
 private static void HandleInput(ConsoleMessage cm)
 {
     if(EConsoleInput != null)
     {
         if(EConsoleInput.GetInvocationList().Length > 0)
             EConsoleInput.Invoke(cm);
     }
 }
示例#2
0
 private static void ConsoleReader_eConsoleInput(ConsoleMessage input)
 {
     switch(input.Header)
     {
         case "quit":
             Stop();
             break;
         case "server":
             String ret = "Host: " + getProperty("BindInt") + ":" + getProperty("BindPort") + "\n";
             new ConsoleEvent(ret).writeEvent(true);
             break;
         case "hosting":
             ret = "IsBound: " + Server.Sock.Server.IsBound.ToString();
             ret += "\n";
             ret += Server.Sock.Server.LocalEndPoint.ToString();
             new ConsoleEvent(ret).writeEvent(true);
             break;
         case "ircchangenick":
             //IrcBot.ChatAsUser(input.Args[0].Argument, "");
             break;
         default:
             new ConsoleEventError("Invalid command '" + input.RawData + "'.", new Exception("Invalid console command.")).writeEvent(true);
             break;
     }
 }