print("Incorrect parameters for ^2ban^7\n");
case CMD_REQUEST_USAGE:
{
- print("\nUsage:^3 sv_cmd ban address [time] reason");
+ print("\nUsage:^3 sv_cmd ban address [time] reason\n");
print(" No arguments required.\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- print("\nUsage:^3 sv_cmd banlist");
+ print("\nUsage:^3 sv_cmd banlist\n");
print(" No arguments required.\n");
return;
}
{
case CMD_REQUEST_COMMAND:
{
- if(argc >= 3)
+ if(argc >= 2)
{
entity client = GetIndexedEntity(argc, 1);
float accepted = VerifyClientEntity(client, TRUE, FALSE);
GET_BAN_ARG(bantime, autocvar_g_ban_default_bantime);
GET_BAN_ARG(masksize, autocvar_g_ban_default_masksize);
- GET_BAN_REASON(reason, "No reason provided.");
+ GET_BAN_REASON(reason, "No reason provided");
Ban_KickBanClient(client, bantime, masksize, reason);
print("Incorrect parameters for ^2kickban^7\n");
case CMD_REQUEST_USAGE:
{
- print("\nUsage:^3 sv_cmd ");
- print(" No arguments required.\n");
+ print("\nUsage:^3 sv_cmd kickban client [bantime masksize reason]\n");
+ print(" No arguments required. todo\n");
return;
}
}
default:
case CMD_REQUEST_USAGE:
{
- print("\nUsage:^3 sv_cmd unban banid");
+ print("\nUsage:^3 sv_cmd unban banid\n");
print(" Where 'banid' is the ID of the ban of which to remove.\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- print("\nUsage:^3 sv_cmd ");
+ print("\nUsage:^3 sv_cmd \n");
print(" No arguments required.\n");
return;
}
if(tell_accepted > 0) // the target is a real client
{
- if(tell_to != self) // and we're allowed to send to them :D
- {
+ //if(tell_to != self) // and we're allowed to send to them :D
+ //{
Say(self, FALSE, tell_to, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)), TRUE);
return;
- }
- else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
+ //}
+ //else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
}
else if(strtolower(argv(1)) == "world")
{
tmp_string = substring(argv(index), 1, -1);
++index;
- if(tmp_string) // is it all one token? like #1
+ if(tmp_string != "") // is it all one token? like #1
{
tmp_number = stof(tmp_string);
}
selection = edict_num(tmp_number); // yes, it was a number
}
else // no, maybe it's a name?
- {
+ {
FOR_EACH_CLIENT(tmp_player)
if (strdecolorize(tmp_player.netname) == strdecolorize(argv(start_index)))
selection = tmp_player;
}
next_token = index;
+ print(strcat("start_index: ", ftos(start_index), ", next_token: ", ftos(next_token), ", edict: ", ftos(num_for_edict(selection)), ".\n"));
return selection;
}
entity client;
float accepted;
- if(argc == 2)
+ if(argc >= 2)
{
client = GetIndexedEntity(argc, 1);
accepted = VerifyClientEntity(client, TRUE, FALSE);
if(accepted > 0)
{
stuffcmd(client, "defer clear\n");
- print("defer clear stuffed to ", argv(1), " (", client.netname, ")\n");
+ print("defer clear stuffed to ", client.netname, "\n");
}
else { print("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
if(accepted > 0)
{
- string reason = ((argc > next_token) ? substring(vote_command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)) : "No reason provided.");
+ string reason = ((argc > next_token) ? substring(vote_command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)) : "No reason provided");
string command_arguments;
if(first_command == "kickban")