Merge pull request #8001 from VOREStation/upstream-merge-7206

[MIRROR] Allows you to toggle off Byond/Discord/URLs in OOC
This commit is contained in:
Aronai Sieyes
2020-05-21 16:01:50 -04:00
committed by GitHub
3 changed files with 43 additions and 4 deletions
+14 -1
View File
@@ -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
+22 -2
View File
@@ -29,7 +29,7 @@
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]")
@@ -39,6 +39,16 @@
to_chat(src, "<span class='danger'>OOC is not allowed during voting.</span>")
return
//VOREStation Add End
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)
@@ -109,11 +119,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)