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:
parent
58e4ec96a5
commit
fed1fb62a7
1 changed files with 10 additions and 7 deletions
|
@ -164,7 +164,7 @@ qboolean SV_CheckRealIP(client_t *client, qboolean force)
|
||||||
ClientReliableWrite_String(client, "Couldn't determine your real ip\n");
|
ClientReliableWrite_String(client, "Couldn't determine your real ip\n");
|
||||||
if (sv_realip_kick.value > host_client->realip_status)
|
if (sv_realip_kick.value > host_client->realip_status)
|
||||||
{
|
{
|
||||||
SV_DropClient(client);
|
client->drop = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!client->realip_status)
|
if (!client->realip_status)
|
||||||
|
@ -3418,14 +3418,17 @@ void SV_Drop_f (void)
|
||||||
extern cvar_t sv_fullredirect;
|
extern cvar_t sv_fullredirect;
|
||||||
|
|
||||||
SV_EndRedirect ();
|
SV_EndRedirect ();
|
||||||
if (host_client->redirect)
|
if (!host_client->drop)
|
||||||
SV_BroadcastPrintf (PRINT_HIGH, "%s redirected to %s\n", host_client->name, sv_fullredirect.string);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (!host_client->spectator)
|
if (host_client->redirect)
|
||||||
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTDROPPED, host_client->name);
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue