diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_ldapoper.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/extra/m_ldapoper.cpp b/src/modules/extra/m_ldapoper.cpp index b8869a8e3..45f03aa8e 100644 --- a/src/modules/extra/m_ldapoper.cpp +++ b/src/modules/extra/m_ldapoper.cpp @@ -98,20 +98,19 @@ public: virtual ModResult OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) { - User* user = dynamic_cast<User*>(ex); if (hashtype == "ldap") { - if (LookupOper(user, data, input)) - { + if (LookupOper(data, input)) /* This is an ldap oper and has been found, claim the OPER command */ + return MOD_RES_ALLOW; + else return MOD_RES_DENY; - } } /* We don't know this oper! */ return MOD_RES_PASSTHRU; } - bool LookupOper(User* user, const std::string &what, const std::string &opassword) + bool LookupOper(const std::string &what, const std::string &opassword) { if (conn == NULL) if (!Connect()) |