コード例 #1
0
ファイル: ClientOutputter.cs プロジェクト: Morphan1/Voxalia
 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 + "'.");
     }
 }
コード例 #2
0
ファイル: ClientChat.cs プロジェクト: Morphan1/Voxalia
 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;
 }