From 19e160117f3dba0b8cfea7bebde41b4be06e951e Mon Sep 17 00:00:00 2001 From: Lev Date: Wed, 16 Apr 2014 17:27:20 +0200 Subject: [PATCH] Directly kick players rather than use a loopback command (bug 5946, r=arkshine) --- plugins/admin.sma | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/admin.sma b/plugins/admin.sma index 8e4e79fb..fbd19cac 100755 --- a/plugins/admin.sma +++ b/plugins/admin.sma @@ -53,7 +53,6 @@ new PLUGINNAME[] = "AMX Mod X" #define ADMIN_IPADDR (1<<3) #define ADMIN_NAME (1<<4) -new g_cmdLoopback[16] new bool:g_CaseSensitiveName[33]; // pcvars @@ -99,10 +98,6 @@ public plugin_init() register_concmd("amx_reloadadmins", "cmdReload", ADMIN_CFG) register_concmd("amx_addadmin", "addadminfn", ADMIN_RCON, " [password] [authtype] - add specified player as an admin to users.ini") - format(g_cmdLoopback, 15, "amxauth%c%c%c%c", random_num('A', 'Z'), random_num('A', 'Z'), random_num('A', 'Z'), random_num('A', 'Z')) - - register_clcmd(g_cmdLoopback, "ackSignal") - remove_user_flags(0, read_flags("z")) // Remove 'user' flag from server rights new configsDir[64] @@ -802,7 +797,7 @@ accessUser(id, name[] = "") if (result & 2) { - client_cmd(id, "%s", g_cmdLoopback) + server_cmd("kick #%d ^"%L^"", get_user_userid(id), id, "NO_ENTRY") return PLUGIN_HANDLED } @@ -848,12 +843,6 @@ public client_infochanged(id) return PLUGIN_CONTINUE } -public ackSignal(id) -{ - server_cmd("kick #%d ^"%L^"", get_user_userid(id), id, "NO_ENTRY") - return PLUGIN_HANDLED -} - public client_authorized(id) return get_pcvar_num(amx_mode) ? accessUser(id) : PLUGIN_CONTINUE