]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_censor.cpp
Fix for bug #415, affects only trunk (wish i'd known this before i started!)
[user/henk/code/inspircd.git] / src / modules / m_censor.cpp
index 7fea6be06e9bfe757385e4ceab7a9393455cd230..1159febf8620ffaf9dff17c8b62c4269d0873f26 100644 (file)
@@ -15,9 +15,6 @@
 #define _SCL_SECURE_NO_DEPRECATE
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 typedef std::map<irc::string,irc::string> censor_t;
 
@@ -113,8 +110,8 @@ class ModuleCensor : public Module
        {
                ServerInstance->Modes->DelMode(cu);
                ServerInstance->Modes->DelMode(cc);
-               DELETE(cu);
-               DELETE(cc);
+               delete cu;
+               delete cc;
        }
 
        virtual void ReplaceLine(irc::string &text, irc::string pattern, irc::string replace)
@@ -177,13 +174,15 @@ class ModuleCensor : public Module
                 */
                ConfigReader* MyConf = new ConfigReader(ServerInstance);
                censors.clear();
+
                for (int index = 0; index < MyConf->Enumerate("badword"); index++)
                {
                        irc::string pattern = (MyConf->ReadValue("badword","text",index)).c_str();
                        irc::string replace = (MyConf->ReadValue("badword","replace",index)).c_str();
                        censors[pattern] = replace;
                }
-               DELETE(MyConf);
+
+               delete MyConf;
        }
        
        virtual Version GetVersion()
@@ -193,4 +192,4 @@ class ModuleCensor : public Module
        
 };
 
-MODULE_INIT(ModuleCensor);
+MODULE_INIT(ModuleCensor)