diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-05-05 18:18:38 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-05-05 18:18:38 -0400 |
commit | 211b09001aecdc5e1b13016cda39f54ba7aa20e4 (patch) | |
tree | bf8ffdf1ca7bdaf6b178d5c4a5bc07c3f86df7c3 /src/map/clif.cpp | |
parent | b155404944cdf3bb500b7d2978fa2ecd34c14c3c (diff) | |
download | tmwa-211b09001aecdc5e1b13016cda39f54ba7aa20e4.tar.gz tmwa-211b09001aecdc5e1b13016cda39f54ba7aa20e4.tar.bz2 tmwa-211b09001aecdc5e1b13016cda39f54ba7aa20e4.tar.xz tmwa-211b09001aecdc5e1b13016cda39f54ba7aa20e4.zip |
add MUTE params
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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<map_session_data> 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<map_session_data> 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<map_session_data> 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)) { |