diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 74f46e5bf4..8a3b7c560b 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -232,7 +232,11 @@ var/list/gamemode_cache = list() var/static/dooc_allowed = 1 var/static/dsay_allowed = 1 - var/static/starlight = 0 // Whether space turfs have ambient light or not + var/allow_byond_links = 0 + var/allow_discord_links = 0 + var/allow_url_links = 0 // honestly if I were you i'd leave this one off, only use in dire situations + + var/starlight = 0 // Whether space turfs have ambient light or not var/static/list/ert_species = list(SPECIES_HUMAN) @@ -423,6 +427,15 @@ var/list/gamemode_cache = list() if ("allow_admin_spawning") config.allow_admin_spawning = 1 + + if ("allow_byond_links") + allow_byond_links = 1 + + if ("allow_discord_links") + allow_discord_links = 1 + + if ("allow_url_links") + allow_url_links = 1 if ("no_dead_vote") config.vote_no_dead = 1 diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index b494e844f4..4ee0213f8f 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -29,7 +29,7 @@ if(prefs.muted & MUTE_OOC) to_chat(src, "You cannot use OOC (muted).") return - if(findtext(msg, "byond://")) + if(findtext(msg, "byond://") && !config.allow_byond_links) to_chat(src, "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]") @@ -39,6 +39,16 @@ to_chat(src, "OOC is not allowed during voting.") return //VOREStation Add End + if(findtext(msg, "discord.gg") && !config.allow_discord_links) + to_chat(src, "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) + to_chat(src, "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]") + return log_ooc(msg, src) @@ -109,11 +119,21 @@ if(prefs.muted & MUTE_OOC) to_chat(src, "You cannot use OOC (muted).") return - if(findtext(msg, "byond://")) + if(findtext(msg, "byond://") && !config.allow_byond_links) to_chat(src, "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) + to_chat(src, "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) + to_chat(src, "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]") + return log_looc(msg,src) diff --git a/config/example/config.txt b/config/example/config.txt index ff0340bcea..713d741b17 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -534,4 +534,10 @@ SQLITE_FEEDBACK_MIN_AGE 7 ENABLE_NIGHT_SHIFTS ## Comment this out to enable playtime restrictions for jobs in their respective departments (mostly for heads) -# USE_PLAYTIME_RESTRICTION_FOR_JOBS \ No newline at end of file +# USE_PLAYTIME_RESTRICTION_FOR_JOBS + +## OOC/LOOC control ## +# Uncomment to allow links of the following kinds. # +# ALLOW_BYOND_LINKS +# ALLOW_DISCORD_LINKS +ALLOW_URL_LINKS