From d35258404d08f14c407b5e5e65c224206429017c Mon Sep 17 00:00:00 2001 From: jenz Date: Sat, 12 Oct 2024 17:18:09 +0200 Subject: [PATCH] now cooldowns should be respected god dammnit --- .../scripting/mapchooser_extended_avg_mapend.sp | 3 +++ mapchooser_extended/scripting/nominations_extended_avg.sp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp b/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp index 752d8909..7ceb1d07 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_avg_mapend.sp @@ -2729,8 +2729,11 @@ public int Native_GetMapCooldown(Handle plugin, int numParams) public int Native_GetMapCooldownTime(Handle plugin, int numParams) { + //just respecting map cooldown time should not be so much work dx + /* if(!InternalAreRestrictionsActive(false)) return 0; + */ int len; GetNativeStringLength(1, len); diff --git a/mapchooser_extended/scripting/nominations_extended_avg.sp b/mapchooser_extended/scripting/nominations_extended_avg.sp index 71979084..ddee656d 100755 --- a/mapchooser_extended/scripting/nominations_extended_avg.sp +++ b/mapchooser_extended/scripting/nominations_extended_avg.sp @@ -1064,8 +1064,11 @@ Menu BuildMapMenu(const char[] filter, int client) } if (g_bClientsIgnoring[client]) { + if (GetMapCooldownTime(map) > GetTime()) + { + continue; + } if(AreRestrictionsActive() && ( - GetMapCooldownTime(map) > GetTime() || GetMapTimeRestriction(map) || GetMapPlayerRestriction(map) || GetAveragePlayerTimeOnServerMapRestriction(map) > 0 || @@ -1251,6 +1254,7 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p { return ITEMDRAW_DISABLED; } + if(!CheckCommandAccess(param1, "sm_nominate_ignore", ADMFLAG_KICK, true) && !Leader_Is(param1)) { if(AreRestrictionsActive() && ( @@ -1446,7 +1450,7 @@ public int Handler_AdminMapSelectMenu(Menu menu, MenuAction action, int param1, if(!CheckCommandAccess(param1, "sm_nominate_ignore", ADMFLAG_KICK, true)) { if(AreRestrictionsActive() && ( - GetMapCooldownTime(map) > GetTime() || + GetMapCooldownTime(map) > GetTime() || //this one is fine cause its admin nomination. GetMapTimeRestriction(map) || GetMapPlayerRestriction(map) || GetAveragePlayerTimeOnServerMapRestriction(map) > 0 ||