mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-30 03:52:52 +00:00
Better spam prevention placing (#680)
Removes the spam prevention procs from all background procs, and ensures that they're only placed on procs that the user can initiate. This will remove the chance of having spam prevention trigger from automated emotes. Fixes #613
This commit is contained in:
@@ -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))
|
||||
@@ -127,4 +125,4 @@
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(746)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -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)
|
||||
O.show_message(message, m_type)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
@@ -98,4 +96,4 @@
|
||||
O.show_message(message, m_type)
|
||||
if(updateicon)
|
||||
regenerate_icons()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
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/parasite/meme))
|
||||
|
||||
@@ -32,4 +30,4 @@
|
||||
M << "The captive mind of [src] whispers, \"[message]\""
|
||||
|
||||
/mob/living/parasite/captive_brain/emote(var/message)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
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))
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
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)
|
||||
|
||||
@@ -37,4 +35,4 @@
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
|
||||
return 1
|
||||
return ..(message, 0)
|
||||
return ..(message, 0)
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
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))
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
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))
|
||||
|
||||
@@ -53,7 +51,7 @@
|
||||
verbs -= /mob/living/carbon/proc/release_control
|
||||
verbs -= /mob/living/carbon/proc/punish_host
|
||||
verbs -= /mob/living/carbon/proc/spawn_larvae
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
..()
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
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))
|
||||
@@ -39,4 +37,4 @@
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
M << "[src.truename] whispers to [host], \"[message]\""
|
||||
M << "[src.truename] whispers to [host], \"[message]\""
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
*/
|
||||
|
||||
set_typing_indicator(0)
|
||||
|
||||
if (src.client.handle_spam_prevention(message, MUTE_IC))
|
||||
return
|
||||
|
||||
usr.say(message)
|
||||
|
||||
/mob/verb/me_verb(message as text)
|
||||
@@ -39,6 +43,10 @@
|
||||
message = sanitize(message)
|
||||
|
||||
set_typing_indicator(0)
|
||||
|
||||
if (src.client.handle_spam_prevention(message, MUTE_IC))
|
||||
return
|
||||
|
||||
if(use_me)
|
||||
usr.emote("me",usr.emote_type,message)
|
||||
else
|
||||
|
||||
13
html/changelogs/skull132-SpamPrevention.yml
Normal file
13
html/changelogs/skull132-SpamPrevention.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Your name.
|
||||
author: Skull132
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Spam prevention is no longer activated by automated emotes."
|
||||
Reference in New Issue
Block a user