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
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)
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