]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Auto loading of commands as shared objects via dlsym (very lightweight interface...
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index 91a6bc31b29911bf64e04c5b4ed26c9fecfe366c..f26e16e0e2edb7cb25a204ef0cba60f88d08c138 100644 (file)
@@ -43,7 +43,7 @@
 
 /* $ModDesc: Provides masking of user hostnames */
 
-extern InspIRCd* ServerInstance;
+
 
 /* The four core functions - F1 is optimized somewhat */
 
@@ -348,7 +348,7 @@ class CloakUser : public ModeHandler
                                                // else, they have an ip
                                                b = std::string(ra) + "." + prefix + ".cloak";
                                        }
-                                       log(DEBUG,"cloak: allocated "+b);
+                                       ServerInstance->Log(DEBUG,"cloak: allocated "+b);
                                        dest->ChangeDisplayedHost(b.c_str());
                                }
                                
@@ -374,7 +374,7 @@ class CloakUser : public ModeHandler
        
        void DoRehash()
        {
-               ConfigReader Conf;
+               ConfigReader Conf(ServerInstance);
                key1 = key2 = key3 = key4 = 0;
                key1 = Conf.ReadInteger("cloak","key1",0,false);
                key2 = Conf.ReadInteger("cloak","key2",0,false);
@@ -416,6 +416,7 @@ class ModuleCloaking : public Module
        
        virtual ~ModuleCloaking()
        {
+               ServerInstance->Modes->DelMode(cu);
                DELETE(cu);
        }
        
@@ -423,7 +424,7 @@ class ModuleCloaking : public Module
        {
                // returns the version number of the module to be
                // listed in /MODULES
-               return Version(1,0,0,2,VF_STATIC|VF_VENDOR);
+               return Version(1,0,0,2,VF_COMMON|VF_VENDOR);
        }
 
        virtual void OnRehash(const std::string &parameter)