Puts server regions behind a define (#31766)

This commit is contained in:
AffectedArc07
2026-03-24 21:51:17 +00:00
committed by GitHub
parent 1395883465
commit 817773b692
6 changed files with 25 additions and 0 deletions
+5
View File
@@ -455,9 +455,12 @@
if(holder && holder.restricted_by_2fa)
to_chat(src,SPAN_BOLDANNOUNCEOOC("<big>You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.\nTo setup 2FA, head to the following menu: <a href='byond://?_src_=prefs;preference=tab;tab=[TAB_GAME]'>Game Preferences</a>")) // Very fucking obvious
#ifdef SERVERREGIONS
// Tell client about their connection
to_chat(src, SPAN_NOTICE("You are currently connected [prefs.server_region ? "via the <b>[prefs.server_region]</b> relay" : "directly"] to Paradise."))
to_chat(src, SPAN_NOTICE("You can change this using the <code>Change Region</code> verb in the OOC tab, as selecting a region closer to you may reduce latency."))
#endif
display_job_bans(TRUE)
/client/proc/is_connecting_from_localhost()
@@ -1150,6 +1153,7 @@
popup.set_content(output)
popup.open(FALSE)
#ifdef SERVERREGIONS
/client/verb/change_region()
set category = "OOC"
set name = "Change Region"
@@ -1178,6 +1182,7 @@
src << link("byond://[GLOB.configuration.url.server_url]")
else
src << link(GLOB.configuration.system.region_map[choice])
#endif
/client/proc/set_eye(new_eye)
if(new_eye == eye)
@@ -69,9 +69,12 @@
map_vote_pref_json = json_decode(raw_fptp)
catch
map_vote_pref_json = list()
#ifdef SERVERREGIONS
// Sanitize the region
if(!(server_region in GLOB.configuration.system.region_map))
server_region = null // This region doesnt exist anymore
#endif
return TRUE
@@ -83,8 +83,10 @@
if(GLOB.join_tos)
output += "<p><a href='byond://?src=[UID()];tos=1'>Terms of Service</A></p>"
#ifdef SERVERREGIONS
if(length(GLOB.configuration.system.region_map))
output += "<p><a href='byond://?src=[UID()];setregion=1'>Set region (reduces ping)</A></p>"
#endif
output += "</center>"
@@ -211,9 +213,11 @@
privacy_consent()
return FALSE
#ifdef SERVERREGIONS
if(href_list["setregion"])
usr.client.change_region()
return FALSE
#endif
if(href_list["late_join"])
if(!client.tos_consent)