diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_cap.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_clearchan.cpp | 2 |
2 files changed, 3 insertions, 2 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); diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp index 5fcec36f1..4142f81d1 100644 --- a/src/modules/m_clearchan.cpp +++ b/src/modules/m_clearchan.cpp @@ -119,7 +119,7 @@ class CommandClearChan : public Command mask = ((method[0] == 'Z') ? curr->GetIPString() : "*@" + curr->host); xline = xlf->Generate(ServerInstance->Time(), 60*60, user->nick, reason, mask); } - catch (ModuleException& ex) + catch (ModuleException&) { // Nothing, move on to the next user continue; |