Adds Automuting

Adds a system adapted from Aurora that will automatically mute someone if they say things too quickly in IC, OOC, Deadchat, Ahelp, or Pray.
This commit is contained in:
Neerti
2017-01-07 16:27:35 -05:00
parent 8ae0c62d60
commit 82ad098e33
8 changed files with 32 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ 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.
handle_spam_prevention(MUTE_ADMINHELP)
//clean the input msg
if(!msg)
return

View File

@@ -10,6 +10,7 @@
if(!msg) return
if(usr.client)
client.handle_spam_prevention(MUTE_PRAY)
if(usr.client.prefs.muted & MUTE_PRAY)
usr << "\red You cannot pray (muted)."
return

View File

@@ -158,7 +158,8 @@
proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(automute)
if(!config.automute_on) return
if(!config.automute_on)
return
else
if(!usr || !usr.client)
return
@@ -169,8 +170,10 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
if(M.client.holder)
usr << "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin/mod.</font>"
if(!M.client) return
if(M.client.holder) return
if(!M.client)
return
if(M.client.holder)
return
var/muteunmute
var/mute_string