]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hostchange.cpp
Add m_sqlutils - Currently provides ID->chan/user lookups
[user/henk/code/inspircd.git] / src / modules / m_hostchange.cpp
index f6fd2bfa362c64f76b16c3a8f06887d73d11d438..de485b2c03e9c456917ab460ee3f3c4ea952d80c 100644 (file)
@@ -20,10 +20,11 @@ using namespace std;
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
+#include "inspircd.h"
 
 /* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */
 
-class Host
+class Host : public classbase
 {
  public:
        std::string action;
@@ -46,13 +47,13 @@ class ModuleHostChange : public Module
                : Module::Module(Me)
        {
                Srv = Me;
-                Conf = new ConfigReader;
+               Conf = new ConfigReader;
                OnRehash("");
        }
        
        virtual ~ModuleHostChange()
        {
-               delete Conf;
+               DELETE(Conf);
        }
 
        Priority Prioritize()
@@ -65,14 +66,14 @@ class ModuleHostChange : public Module
                List[I_OnRehash] = List[I_OnUserConnect] = 1;
        }
 
-       virtual void OnRehash(std::string parameter)
+       virtual void OnRehash(const std::string &parameter)
        {
-               delete Conf;
+               DELETE(Conf);
                Conf = new ConfigReader;
                MySuffix = Conf->ReadValue("host","suffix",0);
                for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
                {
-                       delete i->second;
+                       DELETE(i->second);
                }
                hostchanges.clear();
                for (int index = 0; index < Conf->Enumerate("hostchange"); index++)