]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Begin adding "mute" and "unmute" commands to command system
authorSamual <samual@xonotic.org>
Sat, 24 Mar 2012 19:03:46 +0000 (15:03 -0400)
committerSamual <samual@xonotic.org>
Sat, 24 Mar 2012 19:03:46 +0000 (15:03 -0400)
qcsrc/server/command/banning.qc

index ab58a4aee39dd12316f935087da74945e8886c6c..ff5c9ac4bb6a4161b75e824c99fc5a6062d3d4b7 100644 (file)
@@ -107,6 +107,26 @@ void BanCommand_kickban(float request, float argc, string command)
        }
 }
 
+void BanCommand_mute(float request, float argc, string command)
+{
+       switch(request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                       
+                       return;
+               }
+                       
+               default:
+               case CMD_REQUEST_USAGE:
+               {
+                       print("\nUsage:^3 sv_cmd mute\n");
+                       print("  No arguments required.\n");
+                       return;
+               }
+       }
+}
+
 void BanCommand_unban(float request, float argc)
 {
        switch(request)
@@ -131,6 +151,26 @@ void BanCommand_unban(float request, float argc)
        }
 }
 
+void BanCommand_unmute(float request, float argc)
+{
+       switch(request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                       
+                       return;
+               }
+                       
+               default:
+               case CMD_REQUEST_USAGE:
+               {
+                       print("\nUsage:^3 sv_cmd unmute\n");
+                       print("  No arguments required.\n");
+                       return;
+               }
+       }
+}
+
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
 void BanCommand_(float request)
@@ -166,7 +206,9 @@ void BanCommand_(float request)
        BAN_COMMAND("banlist", BanCommand_banlist(request), "List all existing bans") \
        BAN_COMMAND("bans", BanCommand_banlist(request), "") \
        BAN_COMMAND("kickban", BanCommand_kickban(request, arguments, command), "Disconnect a client and ban it at the same time") \
+       BAN_COMMAND("mute", BanCommand_mute(request, arguments, command), "Disallow a client from talking by muting them") \
        BAN_COMMAND("unban", BanCommand_unban(request, arguments), "Remove an existing ban") \
+       BAN_COMMAND("unmute", BanCommand_unmute(request, arguments), "Unmute a client") \
        /* nothing */
 
 void BanCommand_macro_help()