From 211b09001aecdc5e1b13016cda39f54ba7aa20e4 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 5 May 2016 18:18:38 -0400 Subject: add MUTE params --- src/map/clif.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/map/clif.cpp') diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 81ae02f..bd7f4ef 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -3844,6 +3844,12 @@ RecvResult clif_parse_GlobalMessage(Session *s, dumb_ptr sd) if (is_atcommand(s, sd, mbuf, GmLevel())) return rv; + if (sd->mute.global) + { + clif_displaymessage(s, "Your message could not be sent: you are muted."_s); + return rv; + } + /* Don't send chat that results in an automatic ban. */ if (tmw_CheckChatSpam(sd, mbuf)) { @@ -4188,11 +4194,20 @@ RecvResult clif_parse_Wis(Session *s, dumb_ptr sd) return rv; } + if (magic_message(sd, mbuf)) + return rv; + if (is_atcommand(s, sd, mbuf, GmLevel())) { return rv; } + if (sd->mute.whisper) + { + clif_displaymessage(s, "Your message could not be sent: you are muted."_s); + return rv; + } + /* Don't send chat that results in an automatic ban. */ if (tmw_CheckChatSpam(sd, mbuf)) { @@ -4974,9 +4989,18 @@ RecvResult clif_parse_PartyMessage(Session *s, dumb_ptr sd) return rv; } + if (magic_message(sd, mbuf)) + return rv; + if (is_atcommand(s, sd, mbuf, GmLevel())) return rv; + if (sd->mute.party) + { + clif_displaymessage(s, "Your message could not be sent: you are muted."_s); + return rv; + } + /* Don't send chat that results in an automatic ban. */ if (tmw_CheckChatSpam(sd, mbuf)) { -- cgit v1.2.3-70-g09d2