From f5e186c16e7db9b5903e02efa0300be89af1117c Mon Sep 17 00:00:00 2001 From: Samual Date: Sat, 24 Mar 2012 15:03:46 -0400 Subject: [PATCH] Begin adding "mute" and "unmute" commands to command system --- qcsrc/server/command/banning.qc | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) 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() -- 2.39.2