sourcemod/plugins/basecommands/reloadadmins.sp
David Anderson bd89b6d126 - removed incorrect information about DrawOption, renamed to DisplayOption
- renamed DrawTitle to DisplayTitle

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401531
2007-10-02 14:48:44 +00:00

36 lines
826 B
SourcePawn

PerformReloadAdmins(client)
{
/* Dump it all! */
DumpAdminCache(AdminCache_Groups, true);
DumpAdminCache(AdminCache_Overrides, true);
LogAction(client, -1, "\"%L\" refreshed the admin cache.", client);
ReplyToCommand(client, "[SM] %t", "Admin cache refreshed");
}
public AdminMenu_ReloadAdmins(Handle:topmenu,
TopMenuAction:action,
TopMenuObject:object_id,
param,
String:buffer[],
maxlength)
{
if (action == TopMenuAction_DisplayOption)
{
Format(buffer, maxlength, "%T", "Reload admins", param);
}
else if (action == TopMenuAction_SelectOption)
{
PerformReloadAdmins(param);
RedisplayAdminMenu(topmenu, param);
}
}
public Action:Command_ReloadAdmins(client, args)
{
PerformReloadAdmins(client);
return Plugin_Handled;
}