diff options
author | Wushin <pasekei@gmail.com> | 2016-05-11 17:01:06 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2016-05-11 17:01:06 -0500 |
commit | a8e9ab18abcc3b3dc29098c41ffa5c9a915e8d57 (patch) | |
tree | bf8ffdf1ca7bdaf6b178d5c4a5bc07c3f86df7c3 /src/map/clif.cpp | |
parent | b155404944cdf3bb500b7d2978fa2ecd34c14c3c (diff) | |
parent | 211b09001aecdc5e1b13016cda39f54ba7aa20e4 (diff) | |
download | tmwa-a8e9ab18abcc3b3dc29098c41ffa5c9a915e8d57.tar.gz tmwa-a8e9ab18abcc3b3dc29098c41ffa5c9a915e8d57.tar.bz2 tmwa-a8e9ab18abcc3b3dc29098c41ffa5c9a915e8d57.tar.xz tmwa-a8e9ab18abcc3b3dc29098c41ffa5c9a915e8d57.zip |
Merge pull request #220 from mekolat/mute
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)) { |