Exemplo n.º 1
0
 public override void UnknownCommand(CommandQueue queue, string basecommand, string[] arguments)
 {
     if (TheClient.Network.IsAlive)
     {
         StringBuilder sb = new StringBuilder();
         sb.Append(basecommand);
         for (int i = 0; i < arguments.Length; i++)
         {
             sb.Append("\n").Append(queue.ParseTags != TagParseMode.OFF ? TheClient.Commands.CommandSystem.TagSystem.ParseTagsFromText(arguments[i],
                 TextStyle.Color_Simple, null, DebugMode.MINIMAL, (o) => { throw new Exception("Tag exception: " + o); }, true) : arguments[i]);
         }
         CommandPacketOut packet = new CommandPacketOut(sb.ToString());
         TheClient.Network.SendPacket(packet);
     }
     else
     {
         WriteLine(TextStyle.Color_Error + "Unknown command '" +
             TextStyle.Color_Standout + basecommand + TextStyle.Color_Error + "'.");
     }
 }
Exemplo n.º 2
0
 void EnterChatMessage()
 {
     CloseChat();
     if (ChatBox.Text.Length == 0)
     {
         return;
     }
     if (ChatBox.Text.StartsWith("/"))
     {
         Commands.ExecuteCommands(ChatBox.Text);
     }
     else
     {
         CommandPacketOut packet = new CommandPacketOut("say\n" + ChatBox.Text);
         Network.SendPacket(packet);
     }
     ChatBox.Text = "";
     ChatBox.MinCursor = 0;
     ChatBox.MaxCursor = 0;
 }