Merge pull request #7206 from GeneriedJenelle/patch-1

Allows you to toggle off Byond/Discord/URLs in OOC
This commit is contained in:
Atermonera
2020-05-21 11:19:04 -07:00
committed by GitHub
3 changed files with 42 additions and 3 deletions
+13
View File
@@ -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
+22 -2
View File
@@ -29,11 +29,21 @@
if(prefs.muted & MUTE_OOC)
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
return
if(findtext(msg, "byond://"))
if(findtext(msg, "byond://") && !config.allow_byond_links)
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)
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)
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]")
return
log_ooc(msg, src)
@@ -103,11 +113,21 @@
if(prefs.muted & MUTE_OOC)
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
return
if(findtext(msg, "byond://"))
if(findtext(msg, "byond://") && !config.allow_byond_links)
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)
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)
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]")
return
log_looc(msg,src)
+7 -1
View File
@@ -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
ENABLE_NIGHT_SHIFTS
## OOC/LOOC control ##
# Uncomment to allow links of the following kinds. #
# ALLOW_BYOND_LINKS
# ALLOW_DISCORD_LINKS
ALLOW_URL_LINKS