diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 9499ff912ec..49a077c37bb 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -1,5 +1,10 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null) + + if(!check_rights(R_BAN)) + usr << "\red You do not have permission to do this!" + return + establish_db_connection() if(!dbcon.IsConnected()) return @@ -82,6 +87,10 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") + if(!check_rights(R_BAN)) + usr << "\red You do not have permission to do this!" + return + var/bantype_str if(bantype) var/bantype_pass = 0 @@ -144,6 +153,10 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) + if(!check_rights(R_BAN)) + usr << "\red You do not have permission to do this!" + return + if(!isnum(banid) || !istext(param)) usr << "Cancelled" return @@ -202,6 +215,10 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) datum/admins/proc/DB_ban_unban_by_id(var/id) + if(!check_rights(R_BAN)) + usr << "\red You do not have permission to do this!" + return + var/sql = "SELECT ckey FROM erro_ban WHERE id = [id]" establish_db_connection() @@ -254,9 +271,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) if(!usr.client) return - //if(check_rights(R_BAN)) - // usr << "\red You do not have permission to do this!" - // return + if(!check_rights(R_BAN)) + usr << "\red You do not have permission to do this!" + return establish_db_connection() if(!dbcon.IsConnected()) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 09df6dbe733..87a489b1891 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -1,7 +1,7 @@ //Blocks an attempt to connect before even creating our client datum thing. world/IsBanned(key,address,computer_id) - //if(ckey(key) in admin_datums) - // return ..() + if(ckey(key) in admin_datums) + return ..() if(config.ban_legacy_system)