added amb403 (sm_reloadadmins)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401168
This commit is contained in:
David Anderson
2007-07-24 22:20:58 +00:00
parent 48d71cae26
commit 39f7d51747
4 changed files with 27 additions and 0 deletions
+13
View File
@@ -51,12 +51,25 @@ public OnPluginStart()
RegAdminCmd("sm_unban", Command_Unban, ADMFLAG_UNBAN, "sm_unban <steamid>");
RegAdminCmd("sm_addban", Command_AddBan, ADMFLAG_RCON, "sm_addban <time> <steamid> [reason]");
RegAdminCmd("sm_banip", Command_BanIp, ADMFLAG_RCON, "sm_banip <time> <ip> [reason]");
RegAdminCmd("sm_reloadadmins", Command_ReloadAdmins, ADMFLAG_BAN, "sm_reloadadmins");
hBanForward = CreateGlobalForward("OnClientBanned", ET_Hook, Param_Cell, Param_Cell, Param_Cell, Param_String);
hAddBanForward = CreateGlobalForward("OnBanAdded", ET_Hook, Param_Cell, Param_String, Param_Cell, Param_String);
hBanRemoved = CreateGlobalForward("OnBanRemoved", ET_Hook, Param_Cell, Param_String);
}
public Action:Command_ReloadAdmins(client, args)
{
/* Dump it all! */
DumpAdminCache(AdminCache_Groups, true);
DumpAdminCache(AdminCache_Overrides, true);
LogMessage("\"%L\" refreshed the admin cache.", client);
ReplyToCommand(client, "[SM] %t", "Admin cache refreshed");
return Plugin_Handled;
}
public Action:Command_BanIp(client, args)
{
if (args < 2)