]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ident.cpp
ident: rename nolookupprefix to prefixunqueried.
[user/henk/code/inspircd.git] / src / modules / m_ident.cpp
index 7bd403fd8eb65ea0478d02ccb03c6644992d96c0..f3f8e7dd79eec16ada66b03baa1ccf11521eda8f 100644 (file)
@@ -255,8 +255,8 @@ class IdentRequestSocket : public EventHandler
 class ModuleIdent : public Module
 {
  private:
-       int RequestTimeout;
-       bool NoLookupPrefix;
+       unsigned int timeout;
+       bool prefixunqueried;
        SimpleExtItem<IdentRequestSocket, stdalgo::culldeleter> ext;
 
        static void PrefixIdent(LocalUser* user)
@@ -291,8 +291,8 @@ class ModuleIdent : public Module
        void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("ident");
-               RequestTimeout = tag->getDuration("timeout", 5, 1);
-               NoLookupPrefix = tag->getBool("nolookupprefix", false);
+               timeout = tag->getDuration("timeout", 5, 1, 60);
+               prefixunqueried = tag->getBool("prefixunqueried");
        }
 
        void OnSetUserIP(LocalUser* user) CXX11_OVERRIDE
@@ -340,13 +340,12 @@ class ModuleIdent : public Module
                IdentRequestSocket *isock = ext.get(user);
                if (!isock)
                {
-                       if (NoLookupPrefix)
+                       if (prefixunqueried)
                                PrefixIdent(user);
                        return MOD_RES_PASSTHRU;
                }
 
-               time_t compare = isock->age;
-               compare += RequestTimeout;
+               time_t compare = isock->age + timeout;
 
                /* Check for timeout of the socket */
                if (ServerInstance->Time() >= compare)