mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merged var/muted_ic; var/muted_ooc; var/muted_deadchat; var/muted_pray; var/muted_adminhelp into var/muted as bitflags
Added a config option config.automute_on It toggles automuting. Admins cannot be muted. Made the proc/cmd_admin_mute code shorter. Automuting defaults to off git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4758 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -6,11 +6,7 @@
|
||||
var/buildmode = 0
|
||||
var/seeprayers = 0
|
||||
|
||||
var/muted_ic //can't use 'say' while alive or emotes.
|
||||
var/muted_ooc //can't speak in ooc
|
||||
var/muted_deadchat //can't use 'say' while dead or DSAY
|
||||
var/muted_pray //can't send prayers
|
||||
var/muted_adminhelp //can't send adminhelps, PM-s or use ASAY
|
||||
var/muted = 0
|
||||
|
||||
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
||||
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
..() //redirect to [locate(hsrc)]/Topic()
|
||||
|
||||
/client/proc/handle_spam_prevention(var/message, var/mute_type)
|
||||
if(src.last_message == message)
|
||||
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."
|
||||
|
||||
Reference in New Issue
Block a user