Combines the ss13_admin and ss13_player table. (#4540)

Combines the ss13_admin and ss13_player table into one.

I kinda want to rewrite the entire backend logic since its somewhat dated.
This commit is contained in:
Werner
2018-04-08 16:30:38 +03:00
committed by Erki
parent 043b4b0247
commit a61801d80d
3 changed files with 49 additions and 17 deletions
+2 -4
View File
@@ -110,14 +110,12 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
load_admins()
return
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM ss13_admin")
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, (flags & 0xFFFF) as flags FROM ss13_player WHERE rank IS NOT NULL AND (flags & 0xFFFF) != 0")
query.Execute()
while(query.NextRow())
var/ckey = query.item[1]
var/rank = query.item[2]
if(rank == "Removed") continue //This person was de-adminned. They are only in the admin list for archive purposes.
var/rights = query.item[4]
var/rights = query.item[3]
if(istext(rights)) rights = text2num(rights)
var/datum/admins/D = new /datum/admins(rank, rights, ckey)