diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-02 19:46:09 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-02 19:46:09 +0000 |
commit | 54f3d3f31e59774db9987a804bc867fc0d87e4a6 (patch) | |
tree | 55fc53128bca07757c2d22cdf4d46c6e8f53054a /src | |
parent | 0d2b6637ca369166629576f160ef1fd376078e5a (diff) |
Remove +s when no snomasks are set.. bug found (indirectly) by jackmcbarn.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10793 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modes/umode_s.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp index 93bc60cac..0f1764a7e 100644 --- a/src/modes/umode_s.cpp +++ b/src/modes/umode_s.cpp @@ -30,8 +30,8 @@ ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Chan if (!dest->modes[UM_SNOMASK]) dest->snomasks.reset(); - parameter = dest->ProcessNoticeMasks(parameter.c_str()); dest->modes[UM_SNOMASK] = true; + parameter = dest->ProcessNoticeMasks(parameter.c_str()); return MODEACTION_ALLOW; } else diff --git a/src/users.cpp b/src/users.cpp index 0a196d798..a8a1ba6b3 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -90,6 +90,12 @@ std::string User::ProcessNoticeMasks(const char *sm) *c++; } + std::string s = this->FormatNoticeMasks(); + if (s.length() == 0) + { + this->modes[UM_SNOMASK] = false; + } + return output; } |