]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ldapoper.cpp
Convert InspIRCd::SetSignals to a static function.
[user/henk/code/inspircd.git] / src / modules / m_ldapoper.cpp
index 45e83333afd890e09ab05a96d7de0d4d49f2e44e..b2a1c1f0d4d7aa7679419ffe3b4fdd2733b14cf3 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()
@@ -179,14 +180,14 @@ class AdminBindInterface : public LDAPInterface
        }
 };
 
-class ModuleLDAPAuth : public Module
+class ModuleLDAPOper : public Module
 {
        dynamic_reference<LDAPProvider> LDAP;
        std::string base;
        std::string attribute;
 
  public:
-       ModuleLDAPAuth()
+       ModuleLDAPOper()
                : LDAP(this, "LDAP")
        {
                me = this;
@@ -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)
                {
@@ -245,4 +246,4 @@ class ModuleLDAPAuth : public Module
        }
 };
 
-MODULE_INIT(ModuleLDAPAuth)
+MODULE_INIT(ModuleLDAPOper)