class ModuleIdent : public Module
{
private:
- int RequestTimeout;
- bool NoLookupPrefix;
+ unsigned int timeout;
+ bool prefixunqueried;
SimpleExtItem<IdentRequestSocket, stdalgo::culldeleter> ext;
static void PrefixIdent(LocalUser* user)
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
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)