From dfe1903ecf4faa49b83b85213aa0fbc083fbb0c2 Mon Sep 17 00:00:00 2001 From: Lev2001 Date: Wed, 13 Feb 2013 00:15:40 -0800 Subject: [PATCH] Directly kick players rather than use a loopback command (bug 3884, r=dvander). --- plugins/adminslots.sma | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/plugins/adminslots.sma b/plugins/adminslots.sma index b2b261ab..ee08c00c 100755 --- a/plugins/adminslots.sma +++ b/plugins/adminslots.sma @@ -35,7 +35,6 @@ #include #include -new g_cmdLoopback[16] new g_ResPtr new g_HidePtr @@ -46,9 +45,6 @@ public plugin_init() register_dictionary("common.txt") g_ResPtr = register_cvar("amx_reservation", "0") g_HidePtr = register_cvar("amx_hideslots", "0") - - format(g_cmdLoopback, 15, "amxres%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") } public plugin_cfg() @@ -67,15 +63,6 @@ public MapLoaded() setVisibleSlots(players, maxplayers, limit) } -public ackSignal(id) -{ - new lReason[64] - format(lReason, 63, "%L", id, "DROPPED_RES") - server_cmd("kick #%d ^"%s^"", get_user_userid(id), lReason) - - return PLUGIN_HANDLED -} - public client_authorized(id) { new maxplayers = get_maxplayers() @@ -89,7 +76,9 @@ public client_authorized(id) return PLUGIN_CONTINUE } - client_cmd(id, "%s", g_cmdLoopback) + new lReason[64] + format(lReason, 63, "%L", id, "DROPPED_RES") + server_cmd("kick #%d ^"%s^"", get_user_userid(id), lReason) return PLUGIN_HANDLED }