]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ldapauth.cpp
Merge pull request #578 from SaberUK/master+configure-compiler-detection
[user/henk/code/inspircd.git] / src / modules / extra / m_ldapauth.cpp
index 5ae6594b3c6be380305b54adae8a38df3067e718..a7078bb58560ddc333a6fff0cacecf3242ab336b 100644 (file)
@@ -35,7 +35,6 @@
 # pragma comment(lib, "lber.lib")
 #endif
 
-/* $ModDesc: Allow/Deny connections based upon answer from LDAP server */
 /* $LinkerFlags: -lldap */
 
 struct RAIILDAPString
@@ -119,7 +118,7 @@ public:
                conn = NULL;
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(ldapAuthed);
                ServerInstance->Modules->AddService(ldapVhost);
@@ -134,7 +133,7 @@ public:
                        ldap_unbind_ext(conn, NULL, NULL);
        }
 
-       void OnRehash(User* user)
+       void OnRehash(User* user) CXX11_OVERRIDE
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("ldapauth");
                whitelistedcidrs.clear();
@@ -212,7 +211,7 @@ public:
                        std::string> &replacements)
        {
                std::string result;
-               result.reserve(MAXBUF);
+               result.reserve(text.length());
 
                for (unsigned int i = 0; i < text.length(); ++i) {
                        char c = text[i];
@@ -234,7 +233,7 @@ public:
           return result;
        }
 
-       virtual void OnUserConnect(LocalUser *user)
+       void OnUserConnect(LocalUser *user) CXX11_OVERRIDE
        {
                std::string* cc = ldapVhost.get(user);
                if (cc)
@@ -244,7 +243,7 @@ public:
                }
        }
 
-       ModResult OnUserRegister(LocalUser* user)
+       ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE
        {
                if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern)))
                {
@@ -421,12 +420,12 @@ public:
                return true;
        }
 
-       ModResult OnCheckReady(LocalUser* user)
+       ModResult OnCheckReady(LocalUser* user) CXX11_OVERRIDE
        {
                return ldapAuthed.get(user) ? MOD_RES_PASSTHRU : MOD_RES_DENY;
        }
 
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Allow/Deny connections based upon answer from LDAP server", VF_VENDOR);
        }