From d0a61ef5815733f6527c909d438a1b6f34a92f27 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 May 2006 08:55:29 +0000 Subject: [PATCH] Added request at28865 --- plugins/admincmd.sma | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/plugins/admincmd.sma b/plugins/admincmd.sma index 99e95014..340a487e 100755 --- a/plugins/admincmd.sma +++ b/plugins/admincmd.sma @@ -67,6 +67,7 @@ public plugin_init() register_concmd("amx_cfg", "cmdCfg", ADMIN_CFG, "") register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, " ") register_clcmd("amx_rcon", "cmdRcon", ADMIN_RCON, "") + register_clcmd("amx_showrcon", "cmdShowRcon", ADMIN_RCON, "") register_clcmd("pauseAck", "cmdLBack") } @@ -719,6 +720,29 @@ public cmdPause(id, level, cid) return PLUGIN_HANDLED } +public cmdShowRcon(id, level, cid) +{ + if (!cmd_access(id, level, cid, 2)) + return PLUGIN_HANDLED + + new password[64] + + get_cvar_string("rcon_password", password, 63) + + if (!password[0]) + { + cmdRcon(id, level, cid) + } else { + new args[128] + + read_args(args, 127) + client_cmd(id, "rcon_password %s", password) + client_cmd(id, "rcon %s", args) + } + + return PLUGIN_HANDLED +} + public cmdRcon(id, level, cid) { if (!cmd_access(id, level, cid, 2))