diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-13 22:29:43 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-13 22:29:43 +0000 |
commit | 2552786a2fbed628e7d51a6b8e177981b1ff8d40 (patch) | |
tree | 78870d9691278566789fbdae3299066ef6d6f5de /src/modules/extra/m_ldapoper.cpp | |
parent | 8f85458ff9cdfd0c677086e56492955ee89f6702 (diff) |
Fix inverted return on ldapoper
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12453 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_ldapoper.cpp')
-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()) |