]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ldapoper.cpp
Replace OnRehash() with ReadConfig() that is called on boot, on module load and on...
[user/henk/code/inspircd.git] / src / modules / extra / m_ldapoper.cpp
index f10773ec98411e3349b5a41c841c312c604ff6f3..67ba9a7e5e3ef17f41e44338d240e0234b22a395 100644 (file)
@@ -32,7 +32,6 @@
 # pragma comment(lib, "lber.lib")
 #endif
 
-/* $ModDesc: Adds the ability to authenticate opers via LDAP */
 /* $LinkerFlags: -lldap */
 
 struct RAIILDAPString
@@ -98,20 +97,13 @@ public:
        {
        }
 
-       void init()
-       {
-               Implementation eventlist[] = { I_OnRehash, I_OnPreCommand };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-               OnRehash(NULL);
-       }
-
-       virtual ~ModuleLDAPAuth()
+       ~ModuleLDAPAuth()
        {
                if (conn)
                        ldap_unbind_ext(conn, NULL, NULL);
        }
 
-       virtual void OnRehash(User* user)
+       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("ldapoper");
 
@@ -153,7 +145,7 @@ public:
                return true;
        }
 
-       ModResult OnPreCommand(std::string& command, std::vector<std::string>& parameters, LocalUser* user, bool validated, const std::string& original_line)
+       ModResult OnPreCommand(std::string& command, std::vector<std::string>& parameters, LocalUser* user, bool validated, const std::string& original_line) CXX11_OVERRIDE
        {
                if (validated && command == "OPER" && parameters.size() >= 2)
                {
@@ -230,7 +222,7 @@ public:
                }
        }
 
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Adds the ability to authenticate opers via LDAP", VF_VENDOR);
        }