X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ldapoper.cpp;h=cde5b00d7878b9cc0da9e985881e4ea8d0062190;hb=f35490427c17229e81b1ff266c7dcaf67d1a35b5;hp=9bfa3971f225225ecdf1e73048cb11fcd3b8a585;hpb=a4f222ee1b05e2fdb2744c1694f9140f8099b009;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index 9bfa3971f..cde5b00d7 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -41,14 +41,15 @@ class LDAPOperBase : public LDAPInterface if (!user) return; - Command* oper_command = ServerInstance->Parser->GetHandler("OPER"); + Command* oper_command = ServerInstance->Parser.GetHandler("OPER"); if (!oper_command) return; - std::vector 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() @@ -83,7 +84,7 @@ class BindInterface : public LDAPOperBase void OnResult(const LDAPResult& r) CXX11_OVERRIDE { User* user = ServerInstance->FindUUID(uid); - OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(opername); + ServerConfig::OperIndex::const_iterator iter = ServerInstance->Config->oper_blocks.find(opername); if (!user || iter == ServerInstance->Config->oper_blocks.end()) { @@ -201,14 +202,14 @@ class ModuleLDAPAuth : public Module attribute = tag->getString("attribute"); } - ModResult OnPreCommand(std::string& command, std::vector& 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) { const std::string& opername = parameters[0]; const std::string& password = parameters[1]; - OperIndex::iterator it = ServerInstance->Config->oper_blocks.find(opername); + ServerConfig::OperIndex::const_iterator it = ServerInstance->Config->oper_blocks.find(opername); if (it == ServerInstance->Config->oper_blocks.end()) return MOD_RES_PASSTHRU; @@ -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;