From 5fc9f08665a23201eb362c11b1586d8847d8c038 Mon Sep 17 00:00:00 2001 From: BotoX Date: Tue, 7 Aug 2018 21:40:10 +0200 Subject: [PATCH] Revert "General: Change some permissions around." This reverts commit 62d27305fbe7f67dcd8b27d8865f9380d35a5e9d. --- ExtraCommands/scripting/ExtraCommands.sp | 5 ++++- GlowColors/scripting/GlowColors.sp | 22 +++++++++---------- Status/scripting/Status.sp | 2 +- .../scripting/custom-chatcolors.sp | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ExtraCommands/scripting/ExtraCommands.sp b/ExtraCommands/scripting/ExtraCommands.sp index f429a338..6adbe7e0 100644 --- a/ExtraCommands/scripting/ExtraCommands.sp +++ b/ExtraCommands/scripting/ExtraCommands.sp @@ -346,7 +346,10 @@ public Action Command_Weapon(int client, int argc) if(client >= 1) { - if(!GetAdminFlag(GetUserAdmin(client), Admin_Root)) + AdminId id = GetUserAdmin(client); + int superadmin = GetAdminFlag(id, Admin_Custom3); + + if(!superadmin) { if(StrEqual(sWeapon, "weapon_c4", false) || StrEqual(sWeapon, "weapon_smokegrenade", false) || StrEqual(sWeapon, "item_defuser", false)) { diff --git a/GlowColors/scripting/GlowColors.sp b/GlowColors/scripting/GlowColors.sp index 8135611f..d30e1126 100644 --- a/GlowColors/scripting/GlowColors.sp +++ b/GlowColors/scripting/GlowColors.sp @@ -57,15 +57,15 @@ public void OnPluginStart() g_Regex_RGB = CompileRegex("^(([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\s+){2}([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$"); g_Regex_HEX = CompileRegex("^(#?)([A-Fa-f0-9]{6})$"); - RegAdminCmd("sm_glowcolors", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_glowcolors "); - RegAdminCmd("sm_glowcolours", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_glowcolours "); - RegAdminCmd("sm_glowcolor", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_glowcolor "); - RegAdminCmd("sm_glowcolour", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_glowcolour "); - RegAdminCmd("sm_colors", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_colors "); - RegAdminCmd("sm_colours", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_colours "); - RegAdminCmd("sm_color", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_color "); - RegAdminCmd("sm_colour", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_colour "); - RegAdminCmd("sm_glow", Command_GlowColors, ADMFLAG_CUSTOM1, "Change your players glowcolor. sm_glow "); + RegAdminCmd("sm_glowcolors", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_glowcolors "); + RegAdminCmd("sm_glowcolours", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_glowcolours "); + RegAdminCmd("sm_glowcolor", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_glowcolor "); + RegAdminCmd("sm_glowcolour", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_glowcolour "); + RegAdminCmd("sm_colors", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_colors "); + RegAdminCmd("sm_colours", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_colours "); + RegAdminCmd("sm_color", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_color "); + RegAdminCmd("sm_colour", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_colour "); + RegAdminCmd("sm_glow", Command_GlowColors, ADMFLAG_CUSTOM5, "Change your players glowcolor. sm_glow "); RegAdminCmd("sm_rainbow", Command_Rainbow, ADMFLAG_CUSTOM1, "Enable rainbow glowcolors. sm_rainbow [frequency]"); @@ -172,7 +172,7 @@ public void OnClientPostAdminCheck(int client) void ReadClientCookies(int client) { char sCookie[16]; - if(CheckCommandAccess(client, "sm_glowcolors", ADMFLAG_CUSTOM1)) + if(CheckCommandAccess(client, "sm_glowcolors", ADMFLAG_CUSTOM5)) GetClientCookie(client, g_hClientCookie, sCookie, sizeof(sCookie)); if(StrEqual(sCookie, "")) @@ -187,7 +187,7 @@ void ReadClientCookies(int client) public void OnClientDisconnect(int client) { - if(CheckCommandAccess(client, "sm_glowcolors", ADMFLAG_CUSTOM1)) + if(CheckCommandAccess(client, "sm_glowcolors", ADMFLAG_CUSTOM5)) { if(g_aGlowColor[client][0] == 255 && g_aGlowColor[client][1] == 255 && diff --git a/Status/scripting/Status.sp b/Status/scripting/Status.sp index 280f96d5..59829d92 100644 --- a/Status/scripting/Status.sp +++ b/Status/scripting/Status.sp @@ -170,7 +170,7 @@ public Action Command_Status(int client, const char[] command, int args) else FormatEx(sPlayerState, sizeof(sPlayerState), "spawning"); - if(GetAdminFlag(GetUserAdmin(client), Admin_Root)) + if(GetAdminFlag(GetUserAdmin(client), Admin_Custom3)) GetClientIP(player, sPlayerAddr, sizeof(sPlayerAddr)); PrintToConsole(client, "# %8s %40s %24s %12s %4s %4s %s %s", diff --git a/custom-chatcolors/scripting/custom-chatcolors.sp b/custom-chatcolors/scripting/custom-chatcolors.sp index d7ca886a..724cf82c 100644 --- a/custom-chatcolors/scripting/custom-chatcolors.sp +++ b/custom-chatcolors/scripting/custom-chatcolors.sp @@ -2592,7 +2592,7 @@ public Action Hook_UserMessage(UserMsg msg_id, Handle bf, const players[], int p } } - if (!g_msgAuthor || HasFlag(g_msgAuthor, Admin_Custom1)) + if (!g_msgAuthor || HasFlag(g_msgAuthor, Admin_Generic)) { CFormatColor(g_msgText, sizeof(g_msgText), g_msgAuthor); }