From 59e5ab90b45e79b357f7ae604812628148b2d3c1 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Fri, 1 Sep 2017 13:26:48 -0700 Subject: [PATCH] More admin bans for the ban god (#30319) --- code/modules/admin/DB_ban/functions.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/DB_ban/functions.dm b/code/modules/admin/DB_ban/functions.dm index e580b306b30..ff48adc0562 100644 --- a/code/modules/admin/DB_ban/functions.dm +++ b/code/modules/admin/DB_ban/functions.dm @@ -1,4 +1,5 @@ #define MAX_ADMIN_BANS_PER_ADMIN 1 +#define MAX_ADMIN_BANS_PER_HEADMIN 3 //Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional. /datum/admins/proc/DB_ban_record(bantype, mob/banned_mob, duration = -1, reason, job = "", banckey = null, banip = null, bancid = null) @@ -115,8 +116,11 @@ return if(query_check_adminban_amt.NextRow()) var/adm_bans = text2num(query_check_adminban_amt.item[1]) - if(adm_bans >= MAX_ADMIN_BANS_PER_ADMIN) - to_chat(usr, "You already logged [MAX_ADMIN_BANS_PER_ADMIN] admin ban(s) or more. Do not abuse this function!") + var/max_bans = MAX_ADMIN_BANS_PER_ADMIN + if (check_rights(R_PERMISSIONS, FALSE)) + max_bans = MAX_ADMIN_BANS_PER_HEADMIN + if(adm_bans >= max_bans) + to_chat(usr, "You already logged [max_bans] admin ban(s) or more. Do not abuse this function!") return if(!computerid) computerid = "0"