mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Configuration Controller (#7857)
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
stat_panel.reinitialize() //CHOMPEdit
|
||||
|
||||
//Logs all hrefs
|
||||
if(config && config.log_hrefs && href_logfile)
|
||||
if(config && CONFIG_GET(flag/log_hrefs) && href_logfile) // CHOMPEdit
|
||||
WRITE_LOG(href_logfile, "[src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]")
|
||||
|
||||
//byond bug ID:2256651
|
||||
@@ -187,7 +187,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)) // CHOMPEdit
|
||||
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
|
||||
@@ -282,10 +282,10 @@
|
||||
if((prefs.lastchangelog != changelog_hash) && isnewplayer(src.mob)) //bolds the changelog button on the interface so we know there are updates.
|
||||
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
|
||||
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
|
||||
if(config.aggressive_changelog)
|
||||
if(CONFIG_GET(flag/aggressive_changelog)) // CHOMPEdit
|
||||
src.changes()
|
||||
|
||||
if(config.paranoia_logging)
|
||||
if(CONFIG_GET(flag/paranoia_logging)) // CHOMPEdit
|
||||
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.")
|
||||
@@ -412,29 +412,29 @@
|
||||
|
||||
//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) // CHOMPEdit
|
||||
log_adminwarn("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
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)) // CHOMPEdit
|
||||
if(CONFIG_GET(flag/ipr_allow_existing) && player_age >= CONFIG_GET(number/ipr_minimum_age)) // CHOMPEdit
|
||||
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 // CHOMPEdit
|
||||
//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 // CHOMPEdit
|
||||
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 // CHOMPEdit
|
||||
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.") // CHOMPEdit
|
||||
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 // CHOMPEdit
|
||||
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
|
||||
@@ -496,7 +496,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)) // CHOMPEdit
|
||||
addtimer(CALLBACK(SSassets.transport, TYPE_PROC_REF(/datum/asset_transport, send_assets_slow), src, SSassets.transport.preload), 5 SECONDS)
|
||||
|
||||
/mob/proc/MayRespawn()
|
||||
@@ -537,7 +537,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)]" // CHOMPEdit
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
/* Debug
|
||||
@@ -553,7 +553,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) // CHOMPEdit
|
||||
return FALSE
|
||||
|
||||
var/content = file2text(http["CONTENT"]) //world.Export actually returns a file object in CONTENT
|
||||
@@ -584,7 +584,7 @@
|
||||
|
||||
log_and_message_admins(ipr_error)
|
||||
if(fatal)
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE) // CHOMPEdit
|
||||
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)) // CHOMPEdit
|
||||
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)]" // CHOMPEdit
|
||||
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) // CHOMPEdit
|
||||
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) // CHOMPEdit
|
||||
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)) // CHOMPEdit
|
||||
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]" // CHOMPEdit
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
if(!http || !islist(http)) //If we couldn't check, the service might be down, fail-safe.
|
||||
|
||||
@@ -68,7 +68,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)) // CHOMPEdit
|
||||
var/firstspace = findtext(pref.real_name, " ")
|
||||
var/name_length = length(pref.real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
@@ -103,7 +103,7 @@
|
||||
. += "<b>Pronouns:</b> <a href='?src=\ref[src];id_gender=1'><b>[gender2text(pref.identifying_gender)]</b></a><br>"
|
||||
. += "<b>Age:</b> <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" : "Disabled"]</a><br>" //ChompEDIT - DISABLE the announcement
|
||||
. += "<b>Spawn Point</b>: <a href='?src=\ref[src];spawnpoint=1'>[pref.spawnpoint]</a><br>"
|
||||
if(config.allow_Metadata)
|
||||
if(CONFIG_GET(flag/allow_metadata)) // CHOMPEdit
|
||||
//CHOMPEdit Start
|
||||
. += "<b>OOC Notes: <a href='?src=\ref[src];edit_ooc_notes=1'>Edit</a><a href='?src=\ref[src];edit_ooc_note_favs=1'>Favs</a><a href='?src=\ref[src];edit_ooc_note_likes=1'>Likes</a><a href='?src=\ref[src];edit_ooc_note_maybes=1'>Maybes</a><a href='?src=\ref[src];edit_ooc_note_dislikes=1'>Dislikes</a></b><br>"
|
||||
. += "Detailed field or short list system? <a href='?src=\ref[src];edit_ooc_note_style=1'>[pref.matadata_ooc_style ? "Lists" : "Fields"]</a><br><br>"
|
||||
|
||||
@@ -53,7 +53,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) // CHOMPEdit
|
||||
pref.language_prefixes = prefixes.Copy() // CHOMPEdit
|
||||
for(var/prefix in pref.language_prefixes)
|
||||
if(prefix in forbidden_prefixes)
|
||||
pref.language_prefixes -= prefix
|
||||
@@ -146,7 +147,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) // CHOMPEdit
|
||||
pref.language_prefixes = prefixes.Copy() // CHOMPEdit
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_custom_key"])
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
if(pref.client)
|
||||
pref.client.fps = fps_new
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
else if(href_list["select_ambience_freq"])
|
||||
var/ambience_new = tgui_input_number(user, "Input how often you wish to hear ambience repeated! (1-60 MINUTES, 0 for disabled)", "Global Preference", pref.ambience_freq, 60, 0)
|
||||
if(isnull(ambience_new) || !CanUseTopic(user)) return TOPIC_NOACTION
|
||||
if(ambience_new < 0 || ambience_new > 60) return TOPIC_NOACTION
|
||||
pref.ambience_freq = ambience_new
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
else if(href_list["select_ambience_chance"])
|
||||
var/ambience_chance_new = tgui_input_number(user, "Input the chance you'd like to hear ambience played to you (On area change, or by random ambience). 35 means a 35% chance to play ambience. This is a range from 0-100. 0 disables ambience playing entirely. This is also affected by Ambience Frequency.", "Global Preference", pref.ambience_freq, 100, 0)
|
||||
if(isnull(ambience_chance_new) || !CanUseTopic(user)) return TOPIC_NOACTION
|
||||
@@ -141,7 +141,7 @@
|
||||
else if(href_list["tgui_fancy"])
|
||||
pref.tgui_fancy = !pref.tgui_fancy
|
||||
return TOPIC_REFRESH
|
||||
|
||||
|
||||
else if(href_list["tgui_lock"])
|
||||
pref.tgui_lock = !pref.tgui_lock
|
||||
return TOPIC_REFRESH
|
||||
@@ -187,4 +187,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) // CHOMPEdit
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
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)) // CHOMPEdit
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/content(var/mob/user)
|
||||
. = list()
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
/**
|
||||
* This can take either a single preference datum or a list of preferences, and will return true if *all* preferences in the arguments are enabled.
|
||||
*/
|
||||
*/
|
||||
/client/proc/is_preference_enabled(var/preference)
|
||||
if(!islist(preference))
|
||||
preference = list(preference)
|
||||
|
||||
@@ -65,10 +65,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. // CHOMPEdit
|
||||
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species) // CHOMPEdit
|
||||
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])) // CHOMPEdit
|
||||
continue
|
||||
|
||||
if(max_cost && G.cost > max_cost)
|
||||
@@ -222,14 +222,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)) // CHOMPEdit
|
||||
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) // CHOMPEdit
|
||||
// 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]"]
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
lastJob = job
|
||||
. += "<a href='?src=\ref[src];job_info=[rank]'>"
|
||||
if(jobban_isbanned(user, rank))
|
||||
if(config.usewhitelist && !check_whitelist(user)) // CHOMPedit start
|
||||
if(CONFIG_GET(flag/usewhitelist) && !check_whitelist(user)) // CHOMPedit start
|
||||
. += "<del>[rank]</del></td><td><b> \[WHITELISTED]</b></td></tr>"
|
||||
continue
|
||||
else
|
||||
@@ -282,7 +282,7 @@
|
||||
dat += "You answer to <b>[job.supervisors]</b> normally."
|
||||
|
||||
dat += "<hr style='clear:left;'>"
|
||||
if(config.wikiurl)
|
||||
if(CONFIG_GET(string/wikiurl)) // CHOMPEdit
|
||||
dat += "<a href='?src=\ref[src];job_wiki=[rank]'>Open wiki page in browser</a>"
|
||||
|
||||
var/alt_title = pref.GetPlayerAltTitle(job)
|
||||
@@ -300,7 +300,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]") // CHOMPEdit
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -343,8 +343,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)) // CHOMPEdit
|
||||
user << link(CONFIG_GET(string/forumurl)) // CHOMPEdit
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
|
||||
return
|
||||
@@ -428,7 +428,7 @@ var/list/preferences_datums = list()
|
||||
var/nickname //vorestation edit - This set appends nicknames to the save slot
|
||||
var/list/charlist = list()
|
||||
var/default //VOREStation edit
|
||||
for(var/i=1, i<= config.character_slots, i++)
|
||||
for(var/i = 1, i <= CONFIG_GET(number/character_slots), i++) // CHOMPEdit
|
||||
S.cd = "/character[i]"
|
||||
S["real_name"] >> name
|
||||
S["nickname"] >> nickname //vorestation edit
|
||||
@@ -470,7 +470,7 @@ var/list/preferences_datums = list()
|
||||
var/name
|
||||
var/nickname //vorestation edit - This set appends nicknames to the save slot
|
||||
var/list/charlist = list()
|
||||
for(var/i=1, i<= config.character_slots, i++)
|
||||
for(var/i = 1, i <= CONFIG_GET(number/character_slots), i++) // CHOMPEdit
|
||||
S.cd = "/character[i]"
|
||||
S["real_name"] >> name
|
||||
S["nickname"] >> nickname //vorestation edit
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
S.cd = "/"
|
||||
if(!slot) slot = default_slot
|
||||
if(slot != SAVE_RESET) // SAVE_RESET will reset the slot as though it does not exist, but keep the current slot for saving purposes.
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
slot = sanitize_integer(slot, 1, CONFIG_GET(number/character_slots), initial(default_slot)) // CHOMPEdit
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
S["default_slot"] << slot
|
||||
@@ -102,7 +102,7 @@
|
||||
if(!S) return 0
|
||||
if(!slot) slot = default_slot
|
||||
if(slot != SAVE_RESET)
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
slot = sanitize_integer(slot, 1, CONFIG_GET(number/character_slots), initial(default_slot)) // CHOMPEdit
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
nif_path = nif_durability = nif_savedata = null //VOREStation Add - Don't copy NIF
|
||||
|
||||
@@ -20,26 +20,26 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!config.ooc_allowed)
|
||||
if(!CONFIG_GET(flag/ooc_allowed)) // CHOMPEdit
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!CONFIG_GET(flag/dooc_allowed) && (mob.stat == DEAD)) // CHOMPEdit
|
||||
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
|
||||
return
|
||||
if(findtext(msg, "byond://") && !config.allow_byond_links)
|
||||
if(findtext(msg, "byond://") && !CONFIG_GET(flag/allow_byond_links)) // CHOMPEdit
|
||||
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
|
||||
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)) // CHOMPEdit
|
||||
to_chat(src, "<B>Advertising discords is not allowed.</B>")
|
||||
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)) // CHOMPEdit
|
||||
to_chat(src, "<B>Posting external links is not allowed.</B>")
|
||||
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 // CHOMPEdit
|
||||
to_chat(target, "<span class='ooc'><font color='[src.prefs.ooccolor]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></font></span>")
|
||||
else
|
||||
to_chat(target, "<span class='ooc'><span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></span>")
|
||||
@@ -106,26 +106,26 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!config.looc_allowed)
|
||||
if(!CONFIG_GET(flag/looc_allowed)) // CHOMPEdit
|
||||
to_chat(src, "<span class='danger'>LOOC is globally muted.</span>")
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!CONFIG_GET(flag/dooc_allowed) && (mob.stat == DEAD)) // CHOMPEdit
|
||||
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
|
||||
return
|
||||
if(findtext(msg, "byond://") && !config.allow_byond_links)
|
||||
if(findtext(msg, "byond://") && !CONFIG_GET(flag/allow_byond_links)) // CHOMPEdit
|
||||
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
|
||||
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)) // CHOMPEdit
|
||||
to_chat(src, "<B>Advertising discords is not allowed.</B>")
|
||||
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)) // CHOMPEdit
|
||||
to_chat(src, "<B>Posting external links is not allowed.</B>")
|
||||
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 = "<b>Current Admins ([num_admins_online]):</b>\n" + msg
|
||||
|
||||
if(config.show_mods)
|
||||
if(CONFIG_GET(flag/show_mods)) // CHOMPEdit
|
||||
msg += "\n<b> Current Moderators ([num_mods_online]):</b>\n" + modmsg //YW EDIT
|
||||
|
||||
if(config.show_devs)
|
||||
if(CONFIG_GET(flag/show_devs)) // CHOMPEdit
|
||||
msg += "\n<b> Current Developers ([num_devs_online]):</b>\n" + devmsg
|
||||
|
||||
if(config.show_event_managers)
|
||||
if(CONFIG_GET(flag/show_event_managers)) // CHOMPEdit
|
||||
msg += "\n<b> Current Miscellaneous ([num_event_managers_online]):</b>\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)) // CHOMPEdit
|
||||
msg += "\n<b> Current Mentors ([num_mentors_online]):</b>\n" + mmsg
|
||||
|
||||
msg += "\n<span class='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.</span>"
|
||||
|
||||
Reference in New Issue
Block a user