]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_hostname_lookup.cpp
Introduce Server class
[user/henk/code/inspircd.git] / src / commands / cmd_hostname_lookup.cpp
index f352443d0a501f5926d1223e1a91ab5b65309ca4..c26d3b3d32fc82e5e5f0d3f756f5436eb3d98642 100644 (file)
@@ -92,7 +92,7 @@ class UserResolver : public DNS::Request
                        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);
@@ -191,12 +191,6 @@ class ModuleHostnameLookup : public Module
                ph = &ptrHosts;
        }
 
-       void init()
-       {
-               ServerInstance->Modules->AddService(this->dnsLookup);
-               ServerInstance->Modules->AddService(this->ptrHosts);
-       }
-
        void OnUserInit(LocalUser *user)
        {
                if (!DNS || !user->MyClass->resolvehostnames)
@@ -220,7 +214,7 @@ class ModuleHostnameLookup : public Module
                {
                        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++;
                }
        }