From: Samual Date: Sat, 24 Mar 2012 19:03:46 +0000 (-0400) Subject: Begin adding "mute" and "unmute" commands to command system X-Git-Tag: xonotic-v0.7.0~31^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f5e186c16e7db9b5903e02efa0300be89af1117c;p=xonotic%2Fxonotic-data.pk3dir.git Begin adding "mute" and "unmute" commands to command system --- diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index ab58a4aee..ff5c9ac4b 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -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()