return;
}
- else if(CommonCommand_macro_usage(argc, world)) // Instead of trying to call a command, we're going to see detailed information about it
+ else if(BanCommand_macro_usage(argc)) // Instead of trying to call a command, we're going to see detailed information about it
+ {
+ return;
+ }
+ else if(CommonCommand_macro_usage(argc, world)) // same here, but for common commands instead
{
return;
}
void Ban_View()
{
- float i;
+ float i, n;
string msg;
+
+ print("^2Listing all existing active bans:\n");
+
for(i = 0; i < ban_count; ++i)
{
if(time > ban_expire[i])
continue;
+
+ ++n; // total number of existing bans
+
msg = strcat("#", ftos(i), ": ");
msg = strcat(msg, ban_ip[i], " is still banned for ");
msg = strcat(msg, ftos(ban_expire[i] - time), " seconds");
- print(msg, "\n");
+
+ print(" ", msg, "\n");
}
+
+ print("^2Done listing all active (", ftos(n), ") bans.\n");
}
float Ban_GetClientIP(entity client)