mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-07-16 18:22:18 +01:00
Database banning update
Temporary and manual bans should now still fetch IP and PCID if the entry is present on the player table.
This commit is contained in:
@@ -42,11 +42,15 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
ckey = ckey(banckey)
|
||||
|
||||
if(!autobanner)
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, ip, computerid FROM erro_player WHERE ckey = '[ckey]'")
|
||||
query.Execute()
|
||||
var/validckey = 0
|
||||
if(query.NextRow())
|
||||
validckey = 1
|
||||
if(!ip)
|
||||
ip = query.item[2]
|
||||
if(!computerid)
|
||||
computerid = query.item[3]
|
||||
if(!validckey)
|
||||
if(!banned_mob || (banned_mob && !IsGuestKey(banned_mob.key)))
|
||||
message_admins("<font color='red'>[key_name_admin(usr)] attempted to ban [ckey], but [ckey] has not been seen yet. Please only ban actual players.</font>",1)
|
||||
|
||||
Reference in New Issue
Block a user