From 2552786a2fbed628e7d51a6b8e177981b1ff8d40 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 13 Feb 2010 22:29:43 +0000 Subject: [PATCH] Fix inverted return on ldapoper git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12453 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ldapoper.cpp | 9 ++++----- 1 file 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(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()) -- 2.39.5