]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix inverted return on ldapoper
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 13 Feb 2010 22:29:43 +0000 (22:29 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 13 Feb 2010 22:29:43 +0000 (22:29 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12453 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/extra/m_ldapoper.cpp

index b8869a8e32076a4f926dc75c59dd9a5db3e20c6b..45f03aa8ef6c6df4e5c441c554af1377996583af 100644 (file)
@@ -98,20 +98,19 @@ public:
 
        virtual ModResult OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype)
        {
 
        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 (hashtype == "ldap")
                {
-                       if (LookupOper(user, data, input))
-                       {
+                       if (LookupOper(data, input))
                                /* This is an ldap oper and has been found, claim the OPER command */
                                /* This is an ldap oper and has been found, claim the OPER command */
+                               return MOD_RES_ALLOW;
+                       else
                                return MOD_RES_DENY;
                                return MOD_RES_DENY;
-                       }
                }
                /* We don't know this oper! */
                return MOD_RES_PASSTHRU;
        }
 
                }
                /* 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())
        {
                if (conn == NULL)
                        if (!Connect())