Another take at a new whitelist system (#8887)

* Another take at a new whitelist system

* fixes

* Fixes usage

* Adds python script to reassemble the glorious new whitelist
This commit is contained in:
Atermonera
2023-03-18 00:13:07 -08:00
committed by GitHub
parent bcc0ecb2a1
commit 2cee4d6a57
10 changed files with 221 additions and 248 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ var/global/jobban_keylist[0] //to store the keys & ranks
if (guest_jobbans(rank))
if(config.guest_jobban && IsGuestKey(M.key))
return "Guest Job-ban"
if(config.usewhitelist && !M.client.is_whitelisted(rank)) // This outright doesn't work, but at least compiles. AFAIK we don't use this system at present. ~Ater
if(config.usewhitelist && !M.client.is_whitelisted(rank))
return "Whitelisted Job"
return ckey_is_jobbanned(M.ckey, rank)
+1 -7
View File
@@ -1944,13 +1944,7 @@
var/client/C = locate(href_list["modify_whitelist"])
if(!istype(C))
return
var/entry = input(usr, "Please enter the path of the whitelist you wish to modify:", "Whitelist target", "") as text|null
if(!entry || !ispath(text2path(entry)))
return
if(href_list["set_value"] == "1")
C.add_whitelist(entry)
else if(href_list["set_value"] == "0")
C.remove_whitelist(entry)
usr.client.admin_modify_whitelist((href_list["set_value"] == "1"), ckey(C.ckey))
/mob/living/proc/can_centcom_reply()
return 0