From fe503a1279a4cf1b1a636dff7585907524648912 Mon Sep 17 00:00:00 2001 From: GeneriedJenelle Date: Tue, 19 May 2020 16:29:18 +0100 Subject: [PATCH 1/3] Allows you to toggle off Byond/Discord/URLs in OOC Just toggleable OOC options that you can enable or disable at any time. Might be useful if you guys get hit. --- code/controllers/configuration.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 6316816510..ec35af2752 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -232,6 +232,10 @@ var/list/gamemode_cache = list() var/dooc_allowed = 1 var/dsay_allowed = 1 + 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/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 From 207b8f67545a0a9d89949fe1331aaed7679afc61 Mon Sep 17 00:00:00 2001 From: GeneriedJenelle Date: Tue, 19 May 2020 16:34:33 +0100 Subject: [PATCH 2/3] Update ooc.dm --- code/game/verbs/ooc.dm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 1f50e2422c..d7b649505d 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -29,11 +29,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_ooc(msg, src) @@ -103,11 +113,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) From 066fe7a7cf0f45f0be55bd0bdaf8066ca209740c Mon Sep 17 00:00:00 2001 From: GeneriedJenelle Date: Tue, 19 May 2020 16:36:21 +0100 Subject: [PATCH 3/3] Update config.txt --- config/example/config.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/example/config.txt b/config/example/config.txt index 3591c94630..f28c6539c8 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -518,4 +518,10 @@ SQLITE_FEEDBACK_MIN_AGE 7 #DISABLE_CID_WARN_POPUP ## Comment this out if you don't want to use the 'nightshift lighting' subsystem to adjust lights based on ingame time -ENABLE_NIGHT_SHIFTS \ No newline at end of file +ENABLE_NIGHT_SHIFTS +## OOC/LOOC control ## + +# Uncomment to allow links of the following kinds. # +# ALLOW_BYOND_LINKS +# ALLOW_DISCORD_LINKS +ALLOW_URL_LINKS