diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-09-02 19:58:44 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-09-02 19:58:44 +0200 |
commit | 65667e7cc2f741afdfcfaad40f57d8cab5254633 (patch) | |
tree | 92244ff2510d213662fa5c4845392bba1deddd5a /src/modules/m_cap.cpp | |
parent | f673caf8a89c4d9b8b631e46d20c71118a29eb9c (diff) |
Fix Windows build and most MSVC warnings
Diffstat (limited to 'src/modules/m_cap.cpp')
-rw-r--r-- | src/modules/m_cap.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index e6e01570d..868294fe4 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -55,7 +55,8 @@ class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener static bool CanRequest(LocalUser* user, Ext usercaps, Capability* cap, bool adding) { - if ((usercaps & cap->GetMask()) == adding) + const bool hascap = ((usercaps & cap->GetMask()) != 0); + if (hascap == adding) return true; return cap->OnRequest(user, adding); |