diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index ffa2e07804..4e927da5a9 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -29,6 +29,8 @@
if(prefs.muted & MUTE_OOC)
src << "You cannot use OOC (muted)."
return
+ if(handle_spam_prevention(msg,MUTE_OOC))
+ return
if(findtext(msg, "byond://"))
src << "Advertising other servers is not allowed."
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
@@ -100,6 +102,8 @@
if(prefs.muted & MUTE_OOC)
src << "You cannot use OOC (muted)."
return
+ if(handle_spam_prevention(msg, MUTE_OOC))
+ return
if(findtext(msg, "byond://"))
src << "Advertising other servers is not allowed."
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 8f8532590e..504a8419bf 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -17,6 +17,9 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
+ if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
+ return
+
//clean the input msg
if(!msg)
return
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index bcb87f06d8..898cc4e835 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -56,6 +56,9 @@
else src << "Error: Private-Message: Client not found. They may have lost connection, so try using an adminhelp!"
return
+ if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
+ return
+
//clean the message if it's not sent by a high-rank admin
//todo: sanitize for all???
if(!check_rights(R_SERVER|R_DEBUG,0))
diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm
index 08eda6bb34..11193a3f09 100644
--- a/code/modules/admin/verbs/deadsay.dm
+++ b/code/modules/admin/verbs/deadsay.dm
@@ -15,6 +15,9 @@
src << "You have deadchat muted."
return
+ if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
+ return
+
var/stafftype = uppertext(holder.rank)
msg = sanitize(msg)
diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm
index 1307086a87..fc3674fc96 100644
--- a/code/modules/admin/verbs/pray.dm
+++ b/code/modules/admin/verbs/pray.dm
@@ -13,6 +13,8 @@
if(usr.client.prefs.muted & MUTE_PRAY)
usr << "\red You cannot pray (muted)."
return
+ if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
+ return
var/image/cross = image('icons/obj/storage.dmi',"bible")
msg = "\blue \icon[cross] PRAY: [key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src, src)]) (CA) (SC): [msg]"
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index b6c412f65d..04c42fa7fb 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -74,6 +74,21 @@
..() //redirect to hsrc.Topic()
+/client/proc/handle_spam_prevention(var/message, var/mute_type)
+ if(config.automute_on && !holder && src.last_message == message)
+ src.last_message_count++
+ if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
+ src << "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied."
+ cmd_admin_mute(src.mob, mute_type, 1)
+ return 1
+ if(src.last_message_count >= SPAM_TRIGGER_WARNING)
+ src << "\red You are nearing the spam filter limit for identical messages."
+ return 0
+ else
+ last_message = message
+ src.last_message_count = 0
+ return 0
+
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
/client/AllowUpload(filename, filelength)
if(filelength > UPLOAD_LIMIT)
diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm
index ada597f46b..9dfd3deb44 100644
--- a/code/modules/mob/dead/observer/say.dm
+++ b/code/modules/mob/dead/observer/say.dm
@@ -11,6 +11,9 @@
src << "\red You cannot talk in deadchat (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
+ return
+
. = src.say_dead(message)
@@ -30,6 +33,9 @@
src << "\red You cannot emote in deadchat (muted)."
return
+ if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
+ return
+
. = src.emote_dead(message)
/*
diff --git a/code/modules/mob/living/carbon/alien/emote.dm b/code/modules/mob/living/carbon/alien/emote.dm
index e31a293047..62fa2cf108 100644
--- a/code/modules/mob/living/carbon/alien/emote.dm
+++ b/code/modules/mob/living/carbon/alien/emote.dm
@@ -18,6 +18,8 @@
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if (stat)
return
if(!(message))
diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm
index 5725dd4ec7..f29167f1f3 100644
--- a/code/modules/mob/living/carbon/brain/emote.dm
+++ b/code/modules/mob/living/carbon/brain/emote.dm
@@ -19,6 +19,8 @@
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if (stat)
return
if(!(message))
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index f1a84d6d9d..5504005fc0 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -112,6 +112,8 @@
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if (stat)
return
if(!(message))
diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm
index d82372e52f..a6ea5498cd 100644
--- a/code/modules/mob/living/carbon/metroid/emote.dm
+++ b/code/modules/mob/living/carbon/metroid/emote.dm
@@ -18,6 +18,8 @@
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if (stat)
return
if(!(message))
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index ed6ae3358c..87ea4c566e 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -141,6 +141,9 @@ proc/get_radio_key_from_channel(var/channel)
return say_dead(message)
return
+ if(src.client.handle_spam_prevention(message,MUTE_IC))
+ return
+
//Parse the mode
var/message_mode = parse_message_mode(message, "headset")
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_say.dm b/code/modules/mob/living/silicon/robot/drone/drone_say.dm
index 5cdcd3dbd8..b0f89a70ea 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_say.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_say.dm
@@ -4,6 +4,8 @@
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return 0
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return 0
message = sanitize(message)
diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm
index 36a7e4511d..90a5a19d4a 100644
--- a/code/modules/mob/living/silicon/robot/emote.dm
+++ b/code/modules/mob/living/silicon/robot/emote.dm
@@ -14,6 +14,8 @@
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if (stat)
return
if(!(message))
diff --git a/code/modules/mob/living/simple_animal/borer/borer_captive.dm b/code/modules/mob/living/simple_animal/borer/borer_captive.dm
index f07b9d32ce..2d6bfc34b3 100644
--- a/code/modules/mob/living/simple_animal/borer/borer_captive.dm
+++ b/code/modules/mob/living/simple_animal/borer/borer_captive.dm
@@ -9,6 +9,8 @@
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if(istype(src.loc,/mob/living/simple_animal/borer))
diff --git a/code/modules/mob/living/simple_animal/borer/say.dm b/code/modules/mob/living/simple_animal/borer/say.dm
index e76a02a7e2..0d4cdad06e 100644
--- a/code/modules/mob/living/simple_animal/borer/say.dm
+++ b/code/modules/mob/living/simple_animal/borer/say.dm
@@ -16,6 +16,8 @@
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (muted)."
return
+ if (src.client.handle_spam_prevention(message,MUTE_IC))
+ return
if (copytext(message, 1, 2) == "*")
return emote(copytext(message, 2))
diff --git a/vorestation.dme b/vorestation.dme
index 9010beedee..e83274fb6f 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -2185,7 +2185,6 @@
#include "code\modules\vore\fluffstuff\custom_items_yw.dm"
#include "code\modules\vore\fluffstuff\custom_permits_vr.dm"
#include "code\modules\vore\fluffstuff\MadokaSpear.dm"
-#include "code\modules\vore\fluffstuff\nazirus_yw.dm"
#include "code\modules\vore\resizing\grav_pull_vr.dm"
#include "code\modules\vore\resizing\holder_micro_vr.dm"
#include "code\modules\vore\resizing\resize_vr.dm"