mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
- Added +BAN permission checks to DB_Ban
- Uncommented a piece of code in IsBanned() that was only commented for testing purposes. Admins now once again ignore any bans to their name, except for daemon bans. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5036 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user