Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Furrior committed Feb 11, 2025
1 parent 44af0ea commit d9d5d58
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions code/modules/admin/IsBanned.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
qdel(query_client_in_db)

//Whitelist
if(!real_bans_only && !C && CONFIG_GET(flag/usewhitelist))
// BANDASTATION EDIT - SSCentral - Admins need wls too
if(!real_bans_only && CONFIG_GET(flag/usewhitelist)) // Allow whitelist banning people who are already on a server
if(!check_whitelist(ckey))
// BANDASTATION EDIT - SSCentral - Admins need wls too
// if (admin)
// log_admin("The admin [ckey] has been allowed to bypass the whitelist")
// if (message)
Expand Down
8 changes: 3 additions & 5 deletions code/modules/admin/whitelist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ GLOBAL_LIST(whitelist)
continue
GLOB.whitelist += ckey(line)

if(!GLOB.whitelist.len)
GLOB.whitelist = null
// BADNASTATION EDIT
// if(!GLOB.whitelist.len)
// GLOB.whitelist = null

/proc/check_whitelist(ckey)
if(!GLOB.whitelist)
return FALSE

// BANDASTATION EDIT - SSCentral
return SScentral.is_player_whitelisted(ckey)

Expand Down
5 changes: 5 additions & 0 deletions modular_bandastation/metaserver/code/ss_central.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ SUBSYSTEM_DEF(central)
return SS_INIT_NO_NEED
load_whitelist()

/datum/controller/subsystem/central/stat_entry(msg)
if(!initialized)
return "OFFLINE"
return "WL: [CONFIG_GET(flag/usewhitelist)] [CONFIG_GET(string/whitelist_type)]"

/datum/controller/subsystem/central/proc/load_whitelist()
var/endpoint = "[CONFIG_GET(string/ss_central_url)]/whitelists/ckeys?wl_type=[CONFIG_GET(string/whitelist_type)]&active_only=true&page=1&page_size=9999"

Expand Down

0 comments on commit d9d5d58

Please sign in to comment.