X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ident.cpp;h=f3f8e7dd79eec16ada66b03baa1ccf11521eda8f;hb=09da1499d7bc3a380c2b828eed22e3639d6e5e27;hp=7bd403fd8eb65ea0478d02ccb03c6644992d96c0;hpb=d66757a43817966edc0fdbe62722415354b042aa;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 7bd403fd8..f3f8e7dd7 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -255,8 +255,8 @@ class IdentRequestSocket : public EventHandler class ModuleIdent : public Module { private: - int RequestTimeout; - bool NoLookupPrefix; + unsigned int timeout; + bool prefixunqueried; SimpleExtItem 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)