mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-28 07:38:35 +01:00
Implements a path-based, player-specific whitelisting system (#8725)
* Implements a path-based, player-specific whitelisting system * Readds ported functions * Local testing * Copy-paste error * VV modifications, player panel interface * Testing admin operations * data review
This commit is contained in:
@@ -97,6 +97,11 @@ var/global/floorIsLava = 0
|
||||
"}
|
||||
|
||||
if (M.client)
|
||||
body += "<br><br><b>Whitelists:</b><br>"
|
||||
body += jointext(M.client.get_whitelists_list(), ", ")
|
||||
body += "<br><A href='?src=\ref[src];modify_whitelist=\ref[M.client];set_value=1'>Add Whitelist</A>"
|
||||
body += " - <A href='?src=\ref[src];modify_whitelist=\ref[M.client];set_value=0'>Remove Whitelist</A>"
|
||||
|
||||
if(!istype(M, /mob/new_player))
|
||||
body += "<br><br>"
|
||||
body += "<b>Transformation:</b>"
|
||||
|
||||
@@ -107,7 +107,9 @@ var/global/list/admin_verbs_admin = list(
|
||||
/datum/admins/proc/sendFax,
|
||||
/client/proc/despawn_player,
|
||||
/datum/admins/proc/view_feedback,
|
||||
/client/proc/debug_global_variables
|
||||
/client/proc/debug_global_variables,
|
||||
/client/proc/admin_add_whitelist,
|
||||
/client/proc/admin_del_whitelist
|
||||
)
|
||||
|
||||
var/global/list/admin_verbs_ban = list(
|
||||
@@ -236,7 +238,9 @@ var/global/list/admin_verbs_debug = list(
|
||||
/datum/admins/proc/view_feedback,
|
||||
/client/proc/debug_global_variables,
|
||||
/client/proc/ping_webhook,
|
||||
/client/proc/reload_webhooks
|
||||
/client/proc/reload_webhooks,
|
||||
/client/proc/admin_add_whitelist,
|
||||
/client/proc/admin_del_whitelist
|
||||
)
|
||||
|
||||
var/global/list/admin_verbs_paranoid_debug = list(
|
||||
|
||||
@@ -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 && !check_whitelist(M))
|
||||
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
|
||||
return "Whitelisted Job"
|
||||
|
||||
return ckey_is_jobbanned(M.ckey, rank)
|
||||
|
||||
@@ -1940,6 +1940,18 @@
|
||||
PlayerNotesFilter()
|
||||
return
|
||||
|
||||
if(href_list["modify_whitelist"])
|
||||
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)
|
||||
|
||||
/mob/living/proc/can_centcom_reply()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ GLOBAL_DATUM(debug_real_globals, /debug_real_globals) // :3c
|
||||
"admin_log",
|
||||
"admin_ranks",
|
||||
"admin_state",
|
||||
"alien_whitelist",
|
||||
"alldirs",
|
||||
"ahelp_tickets",
|
||||
"adminfaxes",
|
||||
|
||||
Reference in New Issue
Block a user