mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Ports over configuration controller (#16484)
* Ports over configuration controller * Fixes * Manual path fix * patch (#16490) * patch * . * SQL Fix * Post-rebase fix * Added missing examples --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
stat_panel.reinitialize()
|
||||
|
||||
//Logs all hrefs
|
||||
if(config && config.log_hrefs && href_logfile)
|
||||
if(config && CONFIG_GET(flag/log_hrefs) && href_logfile)
|
||||
WRITE_LOG(href_logfile, "[src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]")
|
||||
|
||||
//byond bug ID:2256651
|
||||
@@ -171,7 +171,7 @@
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
return null
|
||||
|
||||
if(!config.guests_allowed && IsGuestKey(key))
|
||||
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key))
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to https://www.byond.com/ and register for a key.","Guest") // Not tgui_alert
|
||||
del(src)
|
||||
return
|
||||
@@ -278,7 +278,7 @@
|
||||
src.changes()
|
||||
*/
|
||||
|
||||
if(config.paranoia_logging)
|
||||
if(CONFIG_GET(flag/paranoia_logging))
|
||||
var/alert = FALSE //VOREStation Edit start.
|
||||
if(isnum(player_age) && player_age == 0)
|
||||
log_and_message_admins("PARANOIA: [key_name(src)] has connected here for the first time.")
|
||||
@@ -405,30 +405,30 @@
|
||||
|
||||
//Panic bunker code
|
||||
if (isnum(player_age) && player_age == 0) //first connection
|
||||
if (config.panic_bunker && !holder && !deadmin_holder)
|
||||
if (CONFIG_GET(flag/panic_bunker) && !holder && !deadmin_holder)
|
||||
log_adminwarn("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins(span_adminnotice("Failed Login: [key] - New account attempting to connect during panic bunker"))
|
||||
disconnect_with_message("Sorry but the server is currently not accepting connections from never before seen players.")
|
||||
return 0
|
||||
|
||||
// IP Reputation Check
|
||||
if(config.ip_reputation)
|
||||
if(config.ipr_allow_existing && player_age >= config.ipr_minimum_age)
|
||||
if(CONFIG_GET(flag/ip_reputation))
|
||||
if(CONFIG_GET(flag/ipr_allow_existing) && player_age >= CONFIG_GET(number/ipr_minimum_age))
|
||||
log_admin("Skipping IP reputation check on [key] with [address] because of player age")
|
||||
else if(update_ip_reputation()) //It is set now
|
||||
if(ip_reputation >= config.ipr_bad_score) //It's bad
|
||||
if(ip_reputation >= CONFIG_GET(number/ipr_bad_score)) //It's bad
|
||||
|
||||
//Log it
|
||||
if(config.paranoia_logging) //We don't block, but we want paranoia log messages
|
||||
if(CONFIG_GET(flag/paranoia_logging)) //We don't block, but we want paranoia log messages
|
||||
log_and_message_admins("[key] at [address] has bad IP reputation: [ip_reputation]. Will be kicked if enabled in config.")
|
||||
else //We just log it
|
||||
log_admin("[key] at [address] has bad IP reputation: [ip_reputation]. Will be kicked if enabled in config.")
|
||||
|
||||
//Take action if required
|
||||
if(config.ipr_block_bad_ips && config.ipr_allow_existing) //We allow players of an age, but you don't meet it
|
||||
disconnect_with_message("Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [config.ipr_minimum_age] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.")
|
||||
if(CONFIG_GET(flag/ipr_block_bad_ips) && CONFIG_GET(flag/ipr_allow_existing)) //We allow players of an age, but you don't meet it
|
||||
disconnect_with_message("Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [CONFIG_GET(number/ipr_minimum_age)] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.")
|
||||
return 0
|
||||
else if(config.ipr_block_bad_ips) //We don't allow players of any particular age
|
||||
else if(CONFIG_GET(flag/ipr_block_bad_ips)) //We don't allow players of any particular age
|
||||
disconnect_with_message("Sorry, we do not accept connections from users via VPN/Proxy/Tor connections. If you believe this is in error, contact an admin out-of-game.")
|
||||
return 0
|
||||
else
|
||||
@@ -487,7 +487,7 @@
|
||||
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
|
||||
|
||||
//Precache the client with all other assets slowly, so as to not block other browse() calls
|
||||
if (config.asset_simple_preload)
|
||||
if (CONFIG_GET(flag/asset_simple_preload))
|
||||
addtimer(CALLBACK(SSassets.transport, TYPE_PROC_REF(/datum/asset_transport, send_assets_slow), src, SSassets.transport.preload), 5 SECONDS)
|
||||
|
||||
/mob/proc/MayRespawn()
|
||||
@@ -534,7 +534,7 @@
|
||||
//You're welcome to replace this proc with your own that does your own cool stuff.
|
||||
//Just set the client's ip_reputation var and make sure it makes sense with your config settings (higher numbers are worse results)
|
||||
/client/proc/update_ip_reputation()
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[config.ipr_email]"
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[CONFIG_GET(string/ipr_email)]"
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
/* Debug
|
||||
@@ -550,7 +550,7 @@
|
||||
//429 is rate limit exceeded
|
||||
if(text2num(http["STATUS"]) == 429)
|
||||
log_and_message_admins("getipintel.net reports HTTP status 429. IP reputation checking is now disabled. If you see this, let a developer know.")
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
return FALSE
|
||||
|
||||
var/content = file2text(http["CONTENT"]) //world.Export actually returns a file object in CONTENT
|
||||
@@ -581,7 +581,7 @@
|
||||
|
||||
log_and_message_admins(ipr_error)
|
||||
if(fatal)
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
log_and_message_admins("With this error, IP reputation checking is disabled for this shift. Let a developer know.")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
//Service returns a single float in html body
|
||||
/client/proc/ipr_getipintel()
|
||||
if(!config.ipr_email)
|
||||
if(!CONFIG_GET(string/ipr_email))
|
||||
return -1
|
||||
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[config.ipr_email]"
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[CONFIG_GET(string/ipr_email)]"
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
if(!http || !islist(http)) //If we couldn't check, the service might be down, fail-safe.
|
||||
@@ -30,7 +30,7 @@
|
||||
//429 is rate limit exceeded
|
||||
if(text2num(http["STATUS"]) == 429)
|
||||
log_and_message_admins("getipintel.net reports HTTP status 429. IP reputation checking is now disabled. If you see this, let a developer know.")
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
return -1
|
||||
|
||||
var/content = file2text(http["CONTENT"]) //world.Export actually returns a file object in CONTENT
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
log_and_message_admins(ipr_error)
|
||||
if(fatal)
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
log_and_message_admins("With this error, IP reputation checking is disabled for this shift. Let a developer know.")
|
||||
return -1
|
||||
|
||||
@@ -71,10 +71,10 @@
|
||||
|
||||
//Service returns JSON in html body
|
||||
/client/proc/ipr_ipqualityscore()
|
||||
if(!config.ipqualityscore_apikey)
|
||||
if(!CONFIG_GET(string/ipqualityscore_apikey))
|
||||
return -1
|
||||
|
||||
var/request = "https://www.ipqualityscore.com/api/json/ip/[config.ipqualityscore_apikey]/[address]?strictness=1&fast=true&byond_key=[key]"
|
||||
var/request = "https://www.ipqualityscore.com/api/json/ip/[CONFIG_GET(string/ipqualityscore_apikey)]/[address]?strictness=1&fast=true&byond_key=[key]"
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
if(!http || !islist(http)) //If we couldn't check, the service might be down, fail-safe.
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
// Moved from /datum/preferences/proc/copy_to()
|
||||
/datum/category_item/player_setup_item/general/basic/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
if(config.humans_need_surnames)
|
||||
if(CONFIG_GET(flag/humans_need_surnames))
|
||||
var/firstspace = findtext(pref.real_name, " ")
|
||||
var/name_length = length(pref.real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
@@ -93,7 +93,7 @@
|
||||
. += span_bold("Pronouns:") + " <a href='?src=\ref[src];id_gender=1'><b>[gender2text(pref.identifying_gender)]</b></a><br>"
|
||||
. += span_bold("Age:") + " <a href='?src=\ref[src];age=1'>[pref.age]</a> <b>Birthday:</b> <a href='?src=\ref[src];bday_month=1'>[pref.bday_month]</a><b>/</b><a href='?src=\ref[src];bday_day=1'>[pref.bday_day]</a> - <b>Announce?:</b> <a href='?src=\ref[src];bday_announce=1'>[pref.bday_announce ? "Yes" : "No"]</a><br>"
|
||||
. += span_bold("Spawn Point") + ": <a href='?src=\ref[src];spawnpoint=1'>[pref.spawnpoint]</a><br>"
|
||||
if(config.allow_Metadata)
|
||||
if(CONFIG_GET(flag/allow_metadata))
|
||||
. += span_bold("OOC Notes: <a href='?src=\ref[src];edit_ooc_notes=1'>Edit</a><a href='?src=\ref[src];edit_ooc_note_likes=1'>Likes</a><a href='?src=\ref[src];edit_ooc_note_dislikes=1'>Dislikes</a>") + "<br>"
|
||||
. = jointext(.,null)
|
||||
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
pref.alternate_languages -= language
|
||||
|
||||
if(isnull(pref.language_prefixes) || !pref.language_prefixes.len)
|
||||
pref.language_prefixes = config.language_prefixes.Copy()
|
||||
var/list/prefixes = CONFIG_GET(str_list/language_prefixes)
|
||||
pref.language_prefixes = prefixes.Copy()
|
||||
for(var/prefix in pref.language_prefixes)
|
||||
if(prefix in forbidden_prefixes)
|
||||
pref.language_prefixes -= prefix
|
||||
@@ -148,7 +149,8 @@
|
||||
pref.language_prefixes = keys
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["reset_prefix"])
|
||||
pref.language_prefixes = config.language_prefixes.Copy()
|
||||
var/list/prefixes = CONFIG_GET(str_list/language_prefixes)
|
||||
pref.language_prefixes = prefixes.Copy()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_custom_key"])
|
||||
|
||||
@@ -179,4 +179,4 @@
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ui/proc/can_select_ooc_color(var/mob/user)
|
||||
return config.allow_admin_ooccolor && check_rights(R_ADMIN|R_EVENT|R_FUN, 0, user)
|
||||
return CONFIG_GET(flag/allow_admin_ooccolor) && check_rights(R_ADMIN|R_EVENT|R_FUN, 0, user)
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/datum/category_item/player_setup_item/player_global/settings/sanitize_preferences()
|
||||
pref.lastchangelog = sanitize_text(pref.lastchangelog, initial(pref.lastchangelog))
|
||||
pref.lastnews = sanitize_text(pref.lastnews, initial(pref.lastnews))
|
||||
pref.default_slot = sanitize_integer(pref.default_slot, 1, config.character_slots, initial(pref.default_slot))
|
||||
pref.default_slot = sanitize_integer(pref.default_slot, 1, CONFIG_GET(number/character_slots), initial(pref.default_slot))
|
||||
|
||||
@@ -80,10 +80,10 @@ var/list/gear_datums = list()
|
||||
for(var/gear_name in gear_datums)
|
||||
var/datum/gear/G = gear_datums[gear_name]
|
||||
|
||||
if(G.whitelisted && config.loadout_whitelist != LOADOUT_WHITELIST_OFF && pref.client) //VOREStation Edit.
|
||||
if(config.loadout_whitelist == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species)
|
||||
if(G.whitelisted && CONFIG_GET(flag/loadout_whitelist) != LOADOUT_WHITELIST_OFF && pref.client) //VOREStation Edit.
|
||||
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species)
|
||||
continue
|
||||
if(config.loadout_whitelist == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob(), GLOB.all_species[G.whitelisted]))
|
||||
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob(), GLOB.all_species[G.whitelisted]))
|
||||
continue
|
||||
if(max_cost && G.cost > max_cost)
|
||||
continue
|
||||
@@ -236,14 +236,14 @@ var/list/gear_datums = list()
|
||||
if(href_list["next_slot"])
|
||||
//change the current slot number
|
||||
pref.gear_slot = pref.gear_slot+1
|
||||
if(pref.gear_slot>config.loadout_slots)
|
||||
if(pref.gear_slot > CONFIG_GET(number/loadout_slots))
|
||||
pref.gear_slot = 1
|
||||
//If we're moving down a slot..
|
||||
else if(href_list["prev_slot"])
|
||||
//change current slot one down
|
||||
pref.gear_slot = pref.gear_slot-1
|
||||
if(pref.gear_slot<1)
|
||||
pref.gear_slot = config.loadout_slots
|
||||
pref.gear_slot = CONFIG_GET(number/loadout_slots)
|
||||
// Set the currently selected gear to whatever's in the new slot
|
||||
if(pref.gear_list["[pref.gear_slot]"])
|
||||
pref.gear = pref.gear_list["[pref.gear_slot]"]
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
dat += "You answer to <b>[job.supervisors]</b> normally."
|
||||
|
||||
dat += "<hr style='clear:left;'>"
|
||||
if(config.wikiurl)
|
||||
if(CONFIG_GET(string/wikiurl))
|
||||
dat += "<a href='?src=\ref[src];job_wiki=[rank]'>Open wiki page in browser</a>"
|
||||
|
||||
var/alt_title = pref.GetPlayerAltTitle(job)
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
else if(href_list["job_wiki"])
|
||||
var/rank = href_list["job_wiki"]
|
||||
open_link(user,"[config.wikiurl][rank]")
|
||||
open_link(user,"[CONFIG_GET(string/wikiurl)][rank]")
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -372,8 +372,8 @@ var/list/preferences_datums = list()
|
||||
if(!istype(user, /mob/new_player)) return
|
||||
|
||||
if(href_list["preference"] == "open_whitelist_forum")
|
||||
if(config.forumurl)
|
||||
user << link(config.forumurl)
|
||||
if(CONFIG_GET(string/forumurl))
|
||||
user << link(CONFIG_GET(string/forumurl))
|
||||
else
|
||||
to_chat(user, span_danger("The forum URL is not set in the server configuration."))
|
||||
return
|
||||
@@ -460,7 +460,7 @@ var/list/preferences_datums = list()
|
||||
var/default
|
||||
var/list/charlist = list()
|
||||
|
||||
for(var/i in 1 to config.character_slots)
|
||||
for(var/i in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/save_data = savefile.get_entry("character[i]", list())
|
||||
var/name = save_data["real_name"]
|
||||
var/nickname = save_data["nickname"]
|
||||
@@ -501,7 +501,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
var/list/charlist = list()
|
||||
|
||||
for(var/i in 1 to config.character_slots)
|
||||
for(var/i in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/save_data = savefile.get_entry("character[i]", list())
|
||||
var/name = save_data["real_name"]
|
||||
var/nickname = save_data["nickname"]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/preferences/proc/migration_14_nifs(datum/json_savefile/S)
|
||||
var/datum/json_savefile/new_savefile = new /datum/json_savefile(nif_savefile_path(client_ckey))
|
||||
|
||||
for(var/slot in 1 to config.character_slots)
|
||||
for(var/slot in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/prefs = S.get_entry("character[slot]", null)
|
||||
if(!islist(prefs))
|
||||
continue
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/preferences/proc/migration_15_nif_path(datum/json_savefile/S)
|
||||
var/datum/json_savefile/new_savefile = new /datum/json_savefile(nif_savefile_path(client_ckey))
|
||||
|
||||
for(var/slot in 1 to config.character_slots)
|
||||
for(var/slot in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/prefs = new_savefile.get_entry("character[slot]", null)
|
||||
if(!islist(prefs))
|
||||
continue
|
||||
|
||||
@@ -204,7 +204,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(!slot)
|
||||
slot = default_slot
|
||||
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
slot = sanitize_integer(slot, 1, CONFIG_GET(number/character_slots), initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
savefile.set_entry("default_slot", slot)
|
||||
@@ -261,7 +261,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
// This basically just changes default_slot without loading the correct data, so the next save call will overwrite
|
||||
// the slot
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
slot = sanitize_integer(slot, 1, CONFIG_GET(number/character_slots), initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
nif_path = nif_durability = nif_savedata = null //VOREStation Add - Don't copy NIF
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
/datum/preferences/proc/create_character_profiles()
|
||||
var/list/profiles = list()
|
||||
|
||||
for(var/index in 1 to config.character_slots)
|
||||
for(var/index in 1 to CONFIG_GET(number/character_slots))
|
||||
// TODO: It won't be updated in the savefile yet, so just read the name directly
|
||||
// if(index == default_slot)
|
||||
// profiles += read_preference(/datum/preference/name/real_name)
|
||||
|
||||
@@ -20,26 +20,26 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!config.ooc_allowed)
|
||||
if(!CONFIG_GET(flag/ooc_allowed))
|
||||
to_chat(src, span_danger("OOC is globally muted."))
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!CONFIG_GET(flag/dooc_allowed) && (mob.stat == DEAD))
|
||||
to_chat(usr, span_danger("OOC for dead mobs has been turned off."))
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
to_chat(src, span_danger("You cannot use OOC (muted)."))
|
||||
return
|
||||
if(findtext(msg, "byond://") && !config.allow_byond_links)
|
||||
if(findtext(msg, "byond://") && !CONFIG_GET(flag/allow_byond_links))
|
||||
to_chat(src, span_bold("Advertising other servers is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
if(findtext(msg, "discord.gg") && !config.allow_discord_links)
|
||||
if(findtext(msg, "discord.gg") && !CONFIG_GET(flag/allow_discord_links))
|
||||
to_chat(src, span_bold("Advertising discords is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
return
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !config.allow_url_links)
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !CONFIG_GET(flag/allow_url_links))
|
||||
to_chat(src, span_bold("Posting external links is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to post a link in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to post a link in OOC: [msg]")
|
||||
@@ -76,7 +76,7 @@
|
||||
display_name = "[holder.fakekey]/([src.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
if(holder && !holder.fakekey && (holder.rights & R_ADMIN|R_FUN|R_EVENT) && config.allow_admin_ooccolor && (src.prefs.ooccolor != initial(src.prefs.ooccolor))) // keeping this for the badmins
|
||||
if(holder && !holder.fakekey && (holder.rights & R_ADMIN|R_FUN|R_EVENT) && CONFIG_GET(flag/allow_admin_ooccolor) && (src.prefs.ooccolor != initial(src.prefs.ooccolor))) // keeping this for the badmins
|
||||
to_chat(target, span_ooc("<font color='[src.prefs.ooccolor]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> [span_message(msg)]</font>"))
|
||||
else
|
||||
to_chat(target, span_ooc("<span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> " + span_message(msg)) + "</span>")
|
||||
@@ -106,26 +106,26 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!config.looc_allowed)
|
||||
if(!CONFIG_GET(flag/looc_allowed))
|
||||
to_chat(src, span_danger("LOOC is globally muted."))
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!CONFIG_GET(flag/dooc_allowed) && (mob.stat == DEAD))
|
||||
to_chat(usr, span_danger("OOC for dead mobs has been turned off."))
|
||||
return
|
||||
if(prefs.muted & MUTE_LOOC)
|
||||
to_chat(src, span_danger("You cannot use OOC (muted)."))
|
||||
return
|
||||
if(findtext(msg, "byond://") && !config.allow_byond_links)
|
||||
if(findtext(msg, "byond://") && !CONFIG_GET(flag/allow_byond_links))
|
||||
to_chat(src, span_bold("Advertising other servers is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
if(findtext(msg, "discord.gg") && !config.allow_discord_links)
|
||||
if(findtext(msg, "discord.gg") && !CONFIG_GET(flag/allow_discord_links))
|
||||
to_chat(src, span_bold("Advertising discords is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
return
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !config.allow_url_links)
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !CONFIG_GET(flag/allow_url_links))
|
||||
to_chat(src, span_bold("Posting external links is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to post a link in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to post a link in OOC: [msg]")
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
|
||||
msg = span_bold("Current Admins ([num_admins_online]):") + "\n" + msg
|
||||
|
||||
if(config.show_mods)
|
||||
if(CONFIG_GET(flag/show_mods))
|
||||
msg += "\n" + span_bold(" Current Game Masters ([num_mods_online]):") + "\n" + modmsg
|
||||
|
||||
if(config.show_devs)
|
||||
if(CONFIG_GET(flag/show_devs))
|
||||
msg += "\n" + span_bold(" Current Developers ([num_devs_online]):") + "\n" + devmsg
|
||||
|
||||
if(config.show_event_managers)
|
||||
if(CONFIG_GET(flag/show_event_managers))
|
||||
msg += "\n" + span_bold(" Current Miscellaneous ([num_event_managers_online]):") + "\n" + eventMmsg
|
||||
|
||||
var/num_mentors_online = 0
|
||||
@@ -141,7 +141,7 @@
|
||||
mmsg += " (AFK - [round(seconds / 60)] minutes, [seconds % 60] seconds)"
|
||||
mmsg += "\n"
|
||||
|
||||
if(config.show_mentors)
|
||||
if(CONFIG_GET(flag/show_mentors))
|
||||
msg += "\n" + span_bold(" Current Mentors ([num_mentors_online]):") + "\n" + mmsg
|
||||
|
||||
msg += "\n" + span_info("Adminhelps are also sent to Discord. If no admins are available in game try anyway and an admin on Discord may see it and respond.")
|
||||
|
||||
Reference in New Issue
Block a user