]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_hostname_lookup.cpp
Introduce Stats::Context, pass it to the OnStats hook and switch all code to it
[user/henk/code/inspircd.git] / src / coremods / core_hostname_lookup.cpp
index 2c9de3c86db777b48db3178746f07cf6e8034846..f6e0539c1f664465e934fc230309b77855f5dc20 100644 (file)
@@ -170,7 +170,6 @@ class UserResolver : public DNS::Request
                {
                        bound_user->WriteNotice("*** Could not resolve your hostname: " + this->manager->GetErrorStr(query->error) + "; using your IP address (" + bound_user->GetIPString() + ") instead.");
                        dl->set(bound_user, 0);
-                       ServerInstance->stats.DnsBad++;
                }
        }
 };
@@ -183,8 +182,8 @@ class ModuleHostnameLookup : public Module
 
  public:
        ModuleHostnameLookup()
-               : dnsLookup("dnsLookup", this)
-               , ptrHosts("ptrHosts", this)
+               : dnsLookup("dnsLookup", ExtensionItem::EXT_USER, this)
+               , ptrHosts("ptrHosts", ExtensionItem::EXT_USER, this)
                , DNS(this, "DNS")
        {
                dl = &dnsLookup;
@@ -215,7 +214,6 @@ class ModuleHostnameLookup : public Module
                        this->dnsLookup.set(user, 0);
                        delete res_reverse;
                        ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Error in resolver: " + e.GetReason());
-                       ServerInstance->stats.DnsBad++;
                }
        }