safer implementation of the drop clcmd.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4272 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-03-31 01:50:34 +00:00
parent 58e4ec96a5
commit fed1fb62a7
1 changed files with 10 additions and 7 deletions

View File

@ -164,7 +164,7 @@ qboolean SV_CheckRealIP(client_t *client, qboolean force)
ClientReliableWrite_String(client, "Couldn't determine your real ip\n");
if (sv_realip_kick.value > host_client->realip_status)
{
SV_DropClient(client);
client->drop = true;
return false;
}
if (!client->realip_status)
@ -3418,14 +3418,17 @@ void SV_Drop_f (void)
extern cvar_t sv_fullredirect;
SV_EndRedirect ();
if (host_client->redirect)
SV_BroadcastPrintf (PRINT_HIGH, "%s redirected to %s\n", host_client->name, sv_fullredirect.string);
else
if (!host_client->drop)
{
if (!host_client->spectator)
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTDROPPED, host_client->name);
if (host_client->redirect)
SV_BroadcastPrintf (PRINT_HIGH, "%s redirected to %s\n", host_client->name, sv_fullredirect.string);
else
{
if (!host_client->spectator)
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTDROPPED, host_client->name);
}
host_client->drop = true;
}
SV_DropClient (host_client);
}
/*