27 float reason_arg, bantime;
44 LOG_HELP(
"Usage:^3 sv_cmd ban <address> [<bantime>] [<reason>]");
45 LOG_HELP(
" <address> is the IP address or range of the player to ban,");
46 LOG_HELP(
" <bantime> is the amount of time that the ban is active (default if not provided),");
47 LOG_HELP(
" and <reason> is the string to label the ban with as reason for banning.");
48 LOG_HELP(
"See also: ^2banlist, kickban, unban^7");
69 LOG_HELP(
"See also: ^2ban, kickban, unban^7");
85 float reason_arg, bantime, masksize;
111 LOG_HELP(
"Usage:^3 sv_cmd kickban <client> [<bantime>] [<masksize>] [<reason>]");
112 LOG_HELP(
" <client> is the entity number or name of the player to ban,");
113 LOG_HELP(
" <bantime> is the amount of time that the ban is active (default if not provided),");
114 LOG_HELP(
" <masksize> is the range of the IP address (1-thru-4, default if not provided),");
115 LOG_HELP(
" and <reason> is the string to label the ban with as reason for banning.");
116 LOG_HELP(
"See also: ^2ban, banlist, unban^7");
135 CS(client).muted =
true;
149 LOG_HELP(
"Usage:^3 sv_cmd mute <client>");
150 LOG_HELP(
" <client> is the entity number or name of the player to mute.");
165 float tmp_number = -1;
172 if (tmp_string !=
"")
173 tmp_number =
stof(tmp_string);
176 else tmp_number = -1;
182 if ((tmp_number == 0) && (
argv(1) !=
"0")) tmp_number = -1; }
195 LOG_HELP(
"Usage:^3 sv_cmd unban <banid>");
196 LOG_HELP(
" Where <banid> is the ID of the ban of which to remove.");
197 LOG_HELP(
"See also: ^2ban, banlist, kickban^7");
216 CS(client).muted =
false;
230 LOG_HELP(
"Usage:^3 sv_cmd unmute <client>");
231 LOG_HELP(
" <client> is the entity number or name of the player to unmute.");
267 #define BAN_COMMANDS(request, arguments, command) \ 268 BAN_COMMAND("ban", BanCommand_ban(request, arguments, command), "Ban an IP address or a range of addresses (like 1.2.3)") \ 269 BAN_COMMAND("banlist", BanCommand_banlist(request), "List all existing bans") \ 270 BAN_COMMAND("kickban", BanCommand_kickban(request, arguments, command), "Disconnect a client and ban it at the same time") \ 271 BAN_COMMAND("mute", BanCommand_mute(request, arguments, command), "Disallow a client from talking by muting them") \ 272 BAN_COMMAND("unban", BanCommand_unban(request, arguments), "Remove an existing ban") \ 273 BAN_COMMAND("unmute", BanCommand_unmute(request, arguments), "Unmute a client") \ 278 #define BAN_COMMAND(name, function, description) \ 279 { if (strtolower(description) != "") { LOG_INFO(" ^2", name, "^7: ", description); } } 287 #define BAN_COMMAND(name, function, description) \ 288 { if (name == strtolower(argv(0))) { function; return true; } } 298 #define BAN_COMMAND(name, function, description) \ 299 { if (name == strtolower(argv(1))) { function; return true; } } 309 #define BAN_COMMAND(name, function, description) \ 310 { if (strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } }
entity GetIndexedEntity(int argc, float start_index)
float Ban_Insert(string ip, float bantime, string reason, float dosync)
#define GET_BAN_ARG(v, d)
float autocvar_g_ban_default_bantime
const int CMD_REQUEST_USAGE
float BanCommand_macro_usage(int argc)
ClientState CS(Client this)
void BanCommand_macro_write_aliases(float fh)
void BanCommand_mute(int request, int argc, string command)
float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
void BanCommand_banlist(int request)
void BanCommand_ban(int request, int argc, string command)
void BanCommand_unban(int request, int argc)
entity GetFilteredEntity(string input)
float BanCommand_macro_command(int argc, string command)
float autocvar_g_ban_default_masksize
const int CMD_REQUEST_COMMAND
float Ban_Delete(float i)
float BanCommand(string command)
#define GetClientErrorString(clienterror, original_input)
void BanCommand_kickban(int request, int argc, string command)
void BanCommand_unmute(int request, int argc)
void Ban_KickBanClient(entity client, float bantime, float masksize, string reason)
void BanCommand_macro_help()
#define GET_BAN_REASON(v, d)
#define BAN_COMMANDS(request, arguments, command)
float VerifyKickableEntity(entity client)