diff options
author | Adam <Adam@anope.org> | 2013-04-08 00:42:07 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-08 00:42:07 -0500 |
commit | 72493b73056662330592cf5c2f8c77bacd8903b5 (patch) | |
tree | 8c29cb172c4993c07e46e33a8727770509b60c47 /src/channels.cpp | |
parent | 1a37e1c0480f8bd11f57dfba514069a4e9c7d8de (diff) |
Fix secureops
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 62c6462d6..aa67d9683 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -400,7 +400,7 @@ void Channel::RemoveModeInternal(MessageSource &setter, ChannelMode *cm, const A FOREACH_RESULT(I_OnChannelModeUnset, OnChannelModeUnset(this, setter, cm->name, param)); - if (enforce_mlock) + if (enforce_mlock && MOD_RESULT != EVENT_STOP) { /* Reset modes on bots if we're supposed to */ if (this->ci && this->ci->bi && this->ci->bi == bi) @@ -730,10 +730,11 @@ void Channel::SetModesInternal(MessageSource &source, const Anope::string &mode, else paramstring += " " + token; + /* CheckModes below doesn't check secureops (+ the module event) */ if (add) - this->SetModeInternal(source, cm, token, false); + this->SetModeInternal(source, cm, token, enforce_mlock); else - this->RemoveModeInternal(source, cm, token, false); + this->RemoveModeInternal(source, cm, token, enforce_mlock); } else Log() << "warning: Channel::SetModesInternal() recieved more modes requiring params than params, modes: " << mode; |