X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ldapoper.cpp;h=88baf84f3cb1bf8dff20c84b84a499c4ca524b00;hb=d71c37e05911d87830987a09128a178c3e402bb4;hp=4f24615d047c4d5ca0a183154efdbd5fc16d5fc4;hpb=4a6fedd9324d87349a806c9c1d0ae6e7d3c1fd38;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index 4f24615d0..88baf84f3 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2017-2020 Sadie Powell * Copyright (C) 2014, 2018 Attila Molnar * Copyright (C) 2013-2014 Adam * @@ -150,7 +150,13 @@ class AdminBindInterface : public LDAPInterface public: AdminBindInterface(Module* c, const std::string& p, const std::string& u, const std::string& o, const std::string& pa, const std::string& b, const std::string& w) - : LDAPInterface(c), provider(p), user(u), opername(p), password(pa), base(b), what(w) + : LDAPInterface(c) + , provider(p) + , user(u) + , opername(o) + , password(pa) + , base(b) + , what(w) { } @@ -216,8 +222,7 @@ class ModuleLDAPOper : public Module return MOD_RES_PASSTHRU; std::string acceptedhosts = tag->getString("host"); - std::string hostname = user->ident + "@" + user->GetRealHost(); - if (!InspIRCd::MatchMask(acceptedhosts, hostname, user->GetIPString())) + if (!InspIRCd::MatchMask(acceptedhosts, user->MakeHost(), user->MakeHostIP())) return MOD_RES_PASSTHRU; if (!LDAP)