catch (DNS::Exception& e)
{
delete res_forward;
- ServerInstance->Logs->Log("RESOLVER", LOG_DEBUG, "Error in resolver: %s",e.GetReason());
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Error in resolver: " + e.GetReason());
bound_user->WriteNotice("*** There was an internal error resolving your host, using your IP address (" + bound_user->GetIPString() + ") instead.");
dl->set(bound_user, 0);
ph = &ptrHosts;
}
- void init()
- {
- OnRehash(NULL);
- ServerInstance->Modules->AddService(this->dnsLookup);
- ServerInstance->Modules->AddService(this->ptrHosts);
-
- Implementation i[] = { I_OnUserInit, I_OnCheckReady };
- ServerInstance->Modules->Attach(i, this, sizeof(i) / sizeof(Implementation));
- }
-
void OnUserInit(LocalUser *user)
{
- if (!DNS || user->MyClass->nouserdns)
+ if (!DNS || !user->MyClass->resolvehostnames)
{
user->WriteNotice("*** Skipping host resolution (disabled by server administrator)");
return;
{
this->dnsLookup.set(user, 0);
delete res_reverse;
- ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Error in resolver: %s", e.GetReason());
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Error in resolver: " + e.GetReason());
ServerInstance->stats->statsDnsBad++;
}
}