diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index af695044..f14d71ec 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -31,12 +31,7 @@ var/global/normal_ooc_colour = "#002eb8" if(prefs.muted & MUTE_OOC) src << "\red 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]") - message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]") + if(handle_spam_prevention(msg,MUTE_OOC,0)) return if(holder) @@ -148,12 +143,7 @@ var/global/normal_ooc_colour = "#002eb8" if(prefs.muted & MUTE_OOC) src << "\red 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]") - message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]") + if(handle_spam_prevention(msg,MUTE_OOC,0)) return if(holder) @@ -206,4 +196,4 @@ var/global/normal_ooc_colour = "#002eb8" var/prefix = "(R)LOOC" if (C.mob in heard) prefix = "LOOC" - C << "[stealth][prefix]: [src.key]: " \ No newline at end of file + C << "[stealth][prefix]: [src.key]: " diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 41ff2003..01a83cc9 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -15,7 +15,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(prefs.muted & MUTE_ADMINHELP) src << "Error: Admin-PM: You cannot send adminhelps (Muted)." return - if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) + if(src.handle_spam_prevention(msg,MUTE_ADMINHELP,0)) return adminhelped = 2 //Determines if they get the message to reply by clicking the name. diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 8fb8c70f..fd49a3c9 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -56,7 +56,7 @@ else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead return - if (src.handle_spam_prevention(msg,MUTE_ADMINHELP)) + if (src.handle_spam_prevention(msg,MUTE_ADMINHELP,0)) return //clean the message if it's not sent by a high-rank admin @@ -161,4 +161,3 @@ continue if(X.holder.rights & (R_ADMIN|R_MOD)) X << "PM: [key_name(src, X, 0)]->IRC-Admins: \blue [msg]" - diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 33e78ef4..0993a9a0 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -15,9 +15,6 @@ src << "\red You have deadchat muted." return - if (src.handle_spam_prevention(msg,MUTE_DEADCHAT)) - return - var/stafftype = null if (src.holder.rights & R_MOD) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 776c5355..bc1c8789 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -13,7 +13,7 @@ if(usr.client.prefs.muted & MUTE_PRAY) usr << "\red You cannot pray (muted)." return - if(src.client.handle_spam_prevention(msg,MUTE_PRAY)) + if(src.client.handle_spam_prevention(msg,MUTE_PRAY,0)) return var/image/cross = image('icons/obj/storage.dmi',"bible") @@ -58,4 +58,4 @@ msg = "\blue SYNDICATE:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" for(var/client/C in admins) if(C.holder.rights & (R_ADMIN|R_MOD|R_FUN)) - C << msg \ No newline at end of file + C << msg diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 135262c9..ae8ea010 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -89,7 +89,9 @@ ..() //redirect to hsrc.Topic() -/client/proc/handle_spam_prevention(var/message, var/mute_type) +/client/proc/handle_spam_prevention(var/message, var/mute_type, var/pass = 1) + if (pass) + return 0 if(config.automute_on && !holder) if(src.last_message_time > world.time - SPAM_TIMER * 10) if(src.last_message_timer > SPAM_TRIGGER_AUTOMUTE) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index 6e64df73..1e004769 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -11,9 +11,6 @@ src << "\red You cannot talk in deadchat (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_DEADCHAT)) - return - . = src.say_dead(message) @@ -33,9 +30,6 @@ 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 0efcae7c..7c8eafb8 100644 --- a/code/modules/mob/living/carbon/alien/emote.dm +++ b/code/modules/mob/living/carbon/alien/emote.dm @@ -18,8 +18,6 @@ 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)) @@ -124,4 +122,4 @@ for(var/mob/O in hearers(src, null)) O.show_message(message, m_type) //Foreach goto(746) - return \ No newline at end of file + return diff --git a/code/modules/mob/living/carbon/alien/humanoid/emote.dm b/code/modules/mob/living/carbon/alien/humanoid/emote.dm index d0038f08..df135038 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/emote.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/emote.dm @@ -18,8 +18,6 @@ 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)) @@ -132,4 +130,4 @@ for(var/mob/O in hearers(src, null)) O.show_message(message, m_type) //Foreach goto(746) - return \ No newline at end of file + return diff --git a/code/modules/mob/living/carbon/alien/larva/emote.dm b/code/modules/mob/living/carbon/alien/larva/emote.dm index da325c04..f2fe2a58 100644 --- a/code/modules/mob/living/carbon/alien/larva/emote.dm +++ b/code/modules/mob/living/carbon/alien/larva/emote.dm @@ -18,8 +18,6 @@ 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)) @@ -124,4 +122,4 @@ for(var/mob/O in hearers(src, null)) O.show_message(message, m_type) //Foreach goto(746) - return \ No newline at end of file + return diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm index 2cf1cb37..ee41e3c0 100644 --- a/code/modules/mob/living/carbon/brain/emote.dm +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -19,8 +19,6 @@ 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)) @@ -79,4 +77,4 @@ O.show_message(message, m_type) else if (m_type & 2) for (var/mob/O in hearers(src.loc, null)) - O.show_message(message, m_type) \ No newline at end of file + O.show_message(message, m_type) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 799a89fc..c056d2a5 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -74,8 +74,6 @@ 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)) @@ -618,4 +616,4 @@ HTML += "