]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
DELETE() -> delete
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 28 Aug 2007 19:27:19 +0000 (19:27 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 28 Aug 2007 19:27:19 +0000 (19:27 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7973 e03df62e-2008-0410-955e-edbf42e46eb7

14 files changed:
src/modules/m_banexception.cpp
src/modules/m_censor.cpp
src/modules/m_customtitle.cpp
src/modules/m_dccallow.cpp
src/modules/m_ident.cpp
src/modules/m_knock.cpp
src/modules/m_noctcp.cpp
src/modules/m_nonotice.cpp
src/modules/m_operjoin.cpp
src/modules/m_safelist.cpp
src/modules/m_securelist.cpp
src/modules/m_services.cpp
src/modules/m_services_account.cpp
src/modules/m_vhost.cpp

index 152415a9170c0079929571102b9cc57cf77a5af5..66991425bb07ff8fd566de0e12934f6caedcbf59 100644 (file)
@@ -141,7 +141,7 @@ public:
        virtual ~ModuleBanException()
        {
                ServerInstance->Modes->DelMode(be);
-               DELETE(be);
+               delete be;
                ServerInstance->UnpublishInterface("ChannelBanList", this);
        }
 };
index 27bb3b7411d9de795ff3f5644484371688da3df6..1159febf8620ffaf9dff17c8b62c4269d0873f26 100644 (file)
@@ -110,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)
@@ -174,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()
index df142a0891884b06d9d430e8cddc0e3950657bad..73f2cda87dfc2766045a80ed50ad813121685a66 100644 (file)
@@ -71,7 +71,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
                                if (text)
                                {
                                        user->Shrink("ctitle");
-                                       DELETE(text);
+                                       delete text;
                                }
 
                                text = new std::string(title);
@@ -173,7 +173,7 @@ class ModuleCustomTitle : public Module
                if (ctitle)
                {
                        user->Shrink("ctitle");
-                       DELETE(ctitle);
+                       delete ctitle;
                }
        }
 
@@ -188,7 +188,7 @@ class ModuleCustomTitle : public Module
                        if (ctitle)
                        {
                                user->Shrink("ctitle");
-                               DELETE(ctitle);
+                               delete ctitle;
                        }
                }
        }
index fd51e4d61767b1ee066698dc1b83b4fc95869680..fd9e329cd17ad6f235d9a65ef7ab316a5e85dd25 100644 (file)
@@ -112,7 +112,7 @@ class cmd_dccallow : public command_t
                                        }
                                        else
                                        {
-                                               DELETE(dl);
+                                               delete  dl;
                                                user->Shrink("dccallow_list");
                                
                                                // remove from userlist
@@ -276,7 +276,7 @@ class ModuleDCCAllow : public Module
                user->GetExt("dccallow_list", dl);
                if (dl)
                {
-                       DELETE(dl);
+                       delete dl;
                        user->Shrink("dccallow_list");
                        RemoveFromUserlist(user);
                }
index 0fef4d33b984a33c22108c090edffbcf58b6ffca..16629d700610b343711b303d3126d04be8528e87 100644 (file)
@@ -189,9 +189,11 @@ class ModuleIdent : public Module
                Conf = new ConfigReader(ServerInstance);
                IdentTimeout = Conf->ReadInteger("ident", "timeout", 0, true);
                PortBind = Conf->ReadValue("ident", "bind", 0);
+
                if (!IdentTimeout)
                        IdentTimeout = 1;
-               DELETE(Conf);
+
+               delete Conf;
        }
 
        ModuleIdent(InspIRCd* Me)
index 3f960893533d4160606e25a9b5d74d45789a94a0..5ed69273e2d4e82e42a69c5cd92e6585f324a626 100644 (file)
@@ -100,10 +100,11 @@ class ModuleKnock : public Module
  public:
        ModuleKnock(InspIRCd* Me) : Module(Me)
        {
-               
                kn = new Knock(ServerInstance);
+
                if (!ServerInstance->AddMode(kn, 'K'))
                        throw ModuleException("Could not add new modes!");
+
                mycommand = new cmd_knock(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }
@@ -115,7 +116,7 @@ class ModuleKnock : public Module
        virtual ~ModuleKnock()
        {
                ServerInstance->Modes->DelMode(kn);
-               DELETE(kn);
+               delete kn;
        }
 
        virtual Version GetVersion()
index 8bb84c6ce30179add405a12ec97a4b082fdcba9a..b2d15f9d7b0e80ed9be398e982e0584e02e688ed 100644 (file)
@@ -92,7 +92,7 @@ class ModuleNoCTCP : public Module
        virtual ~ModuleNoCTCP()
        {
                ServerInstance->Modes->DelMode(nc);
-               DELETE(nc);
+               delete nc;
        }
 
        virtual Version GetVersion()
index e536328bc0b0b65a51c5d98a8d686a9be70d7ca7..fdec61a7ef5c420bc8b00897e5c0eb08a7bf6fa8 100644 (file)
@@ -88,7 +88,7 @@ class ModuleNoNotice : public Module
        virtual ~ModuleNoNotice()
        {
                ServerInstance->Modes->DelMode(nt);
-               DELETE(nt);
+               delete nt;
        }
        
        virtual Version GetVersion()
index 8383de739a20f41accb54e69477b6a7ded682e15..45fcf6be85ad3345be2d2c0faacb805930ae33b6 100644 (file)
@@ -60,7 +60,7 @@ class ModuleOperjoin : public Module
                        if (!operChan.empty())
                                tokenize(operChan,operChans);
 
-                       DELETE(conf);
+                       delete conf;
                }
 
                virtual ~ModuleOperjoin()
index e23a00531821476a9d1bda78a070be2d90d62b94..40b8d1b0f03f36bf402044d56951054751707868 100644 (file)
@@ -139,7 +139,7 @@ class ModuleSafeList : public Module
                                return 1;
                        }
 
-                       DELETE(last_list_time);
+                       delete last_list_time;
                        user->Shrink("safelist_last");
                }
 
@@ -221,7 +221,7 @@ class ModuleSafeList : public Module
                        if (ld->list_ended)
                        {
                                user->Shrink("safelist_cache");
-                               DELETE(ld);
+                               delete ld;
                                global_listing--;
                        }
                }
@@ -237,14 +237,14 @@ class ModuleSafeList : public Module
                        if (ld)
                        {
                                u->Shrink("safelist_cache");
-                               DELETE(ld);
+                               delete ld;
                                global_listing--;
                        }
                        time_t* last_list_time;
                        u->GetExt("safelist_last", last_list_time);
                        if (last_list_time)
                        {
-                               DELETE(last_list_time);
+                               delete last_list_time;
                                u->Shrink("safelist_last");
                        }
                }
index d3292145511796879f922fa179dc2ed566f5cb15..797088d1c242ef7f108eebc6716ca938107e3f58 100644 (file)
@@ -39,10 +39,12 @@ class ModuleSecureList : public Module
        {
                ConfigReader* MyConf = new ConfigReader(ServerInstance);
                allowlist.clear();
+
                for (int i = 0; i < MyConf->Enumerate("securehost"); i++)
                        allowlist.push_back(MyConf->ReadValue("securehost", "exception", i));
+
                WaitTime = MyConf->ReadInteger("securelist", "waittime", "60", 0, true);
-               DELETE(MyConf);
+               delete MyConf;
        }
  
        void Implements(char* List)
index 7cf894fbc8d48d065bd3693a13fb6f62399c6147..c1152b7de05fccc5f1d9382750ca58d5d9eea605 100644 (file)
@@ -290,11 +290,11 @@ class ModuleServices : public Module
                ServerInstance->Modes->DelMode(m3);
                ServerInstance->Modes->DelMode(m4);
                ServerInstance->Modes->DelMode(m5);
-               DELETE(m1);
-               DELETE(m2);
-               DELETE(m3);
-               DELETE(m4);
-               DELETE(m5);
+               delete m1;
+               delete m2;
+               delete m3;
+               delete m4;
+               delete m5;
        }
        
        virtual Version GetVersion()
index 78fd9b0a843477bd8c6d05c6c1edaf126eed255f..74e4453762a9ad132b1cd9758890d2c55fd33462 100644 (file)
@@ -314,9 +314,9 @@ class ModuleServicesAccount : public Module
                ServerInstance->Modes->DelMode(m1);
                ServerInstance->Modes->DelMode(m2);
                ServerInstance->Modes->DelMode(m3);
-               DELETE(m1);
-               DELETE(m2);
-               DELETE(m3);
+               delete m1;
+               delete m2;
+               delete m3;
        }
        
        virtual Version GetVersion()
index 4654507f6aeaf8b2a6e866097863c663a40369d5..71f1069a3eb4557ed6566bca18acee74f48ae8ac 100644 (file)
@@ -15,8 +15,6 @@
 
 /* $ModDesc: Provides masking of user hostnames via traditional /VHOST command */
 
-static ConfigReader* Conf;
-
 /** Handle /VHOST
  */
 class cmd_vhost : public command_t
@@ -30,6 +28,8 @@ class cmd_vhost : public command_t
 
        CmdResult Handle (const char** parameters, int pcnt, userrec *user)
        {
+               ConfigReader *Conf = new ConfigReader(ServerInstance);
+
                for (int index = 0; index < Conf->Enumerate("vhost"); index++)
                {
                        std::string mask = Conf->ReadValue("vhost","host",index);
@@ -42,12 +42,14 @@ class cmd_vhost : public command_t
                                {
                                        user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
                                        user->ChangeDisplayedHost(mask.c_str());
+                                       delete Conf;
                                        return CMD_LOCALONLY;
                                }
                        }
                }
 
                user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid username or password.");
+               delete Conf;
                return CMD_FAILURE;
        }
 };
@@ -61,28 +63,18 @@ class ModuleVHost : public Module
  public:
        ModuleVHost(InspIRCd* Me) : Module(Me)
        {
-               
-               Conf = new ConfigReader(ServerInstance);
                mycommand = new cmd_vhost(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }
        
        virtual ~ModuleVHost()
        {
-               DELETE(Conf);
        }
 
        void Implements(char* List)
        {
-               List[I_OnRehash] = 1;
        }
 
-       virtual void OnRehash(userrec* user, const std::string &parameter)
-       {
-               DELETE(Conf);
-               Conf = new ConfigReader(ServerInstance);
-       }
-       
        virtual Version GetVersion()
        {
                return Version(1,1,0,1,VF_VENDOR,API_VERSION);