]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ldapoper.cpp
Update the exemptchanops module section in modules.conf.example with missing exemptions.
[user/henk/code/inspircd.git] / src / modules / m_ldapoper.cpp
index 9deb9a203790b703dde614651c00312271ff900f..cde5b00d7878b9cc0da9e985881e4ea8d0062190 100644 (file)
@@ -45,10 +45,11 @@ class LDAPOperBase : public LDAPInterface
                if (!oper_command)
                        return;
 
-               std::vector<std::string> params;
+               CommandBase::Params params;
                params.push_back(opername);
                params.push_back(password);
-               oper_command->Handle(params, user);
+               ClientProtocol::TagMap tags;
+               oper_command->Handle(user, CommandBase::Params(params, tags));
        }
 
        void Fallback()
@@ -201,7 +202,7 @@ class ModuleLDAPAuth : public Module
                attribute = tag->getString("attribute");
        }
 
-       ModResult OnPreCommand(std::string& command, std::vector<std::string>& parameters, LocalUser* user, bool validated, const std::string& original_line) CXX11_OVERRIDE
+       ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) CXX11_OVERRIDE
        {
                if (validated && command == "OPER" && parameters.size() >= 2)
                {
@@ -217,7 +218,7 @@ class ModuleLDAPAuth : public Module
                                return MOD_RES_PASSTHRU;
 
                        std::string acceptedhosts = tag->getString("host");
-                       std::string hostname = user->ident + "@" + user->host;
+                       std::string hostname = user->ident + "@" + user->GetRealHost();
                        if (!InspIRCd::MatchMask(acceptedhosts, hostname, user->GetIPString()))
                                return MOD_RES_PASSTHRU;