From fed1fb62a7e34ab58fa87f6fd3d836e8c005c865 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 31 Mar 2013 01:50:34 +0000 Subject: [PATCH] safer implementation of the drop clcmd. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4272 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_user.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index ce13364ca..c7f9a4532 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -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); } /*