]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
Make various self contained methods static.
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index d2f24f9109999dd4010bcb986a37dff23e1b9cf9..9e67a4f0882a662f9466976553396640c24f26fc 100644 (file)
@@ -27,8 +27,6 @@
 #include "xline.h"
 #include "modules/dns.h"
 
-/* $ModDesc: Change user's hosts connecting from known CGI:IRC hosts */
-
 enum CGItype { PASS, IDENT, PASSFIRST, IDENTFIRST, WEBIRC };
 
 
@@ -208,7 +206,7 @@ class ModuleCgiIRC : public Module
                RecheckClass(user);
 
                // Don't create the resolver if the core couldn't put the user in a connect class or when dns is disabled
-               if (user->quitting || !DNS || user->MyClass->nouserdns)
+               if (user->quitting || !DNS || !user->MyClass->resolvehostnames)
                        return;
 
                CGIResolver* r = new CGIResolver(*this->DNS, this, cmd.notify, newip, user, (was_pass ? "PASS" : "IDENT"), waiting);
@@ -236,17 +234,7 @@ public:
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               OnRehash(NULL);
-               ServiceProvider* providerlist[] = { &cmd, &cmd.realhost, &cmd.realip, &cmd.webirc_hostname, &cmd.webirc_ip, &waiting };
-               ServerInstance->Modules->AddServices(providerlist, sizeof(providerlist)/sizeof(ServiceProvider*));
-
-               Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCheckReady };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-       }
-
-       void OnRehash(User* user) CXX11_OVERRIDE
+       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                cmd.Hosts.clear();
 
@@ -281,7 +269,7 @@ public:
                                        else
                                        {
                                                cgitype = PASS;
-                                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str());
+                                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str());
                                        }
 
                                        cmd.Hosts.push_back(CGIhost(hostmask, cgitype, password));
@@ -289,7 +277,7 @@ public:
                        }
                        else
                        {
-                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:mask> value in config: %s", hostmask.c_str());
+                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Invalid <cgihost:mask> value in config: %s", hostmask.c_str());
                                continue;
                        }
                }