diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-28 19:27:19 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-28 19:27:19 +0000 |
commit | 0549fb41568be278319326ae55be69018e2e5aa8 (patch) | |
tree | 063b63d39d8876017a9d04b3b49782151112e6ba /src | |
parent | 2ccbc50453f3e70397299b83ba28d0289535b947 (diff) |
DELETE() -> delete
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7973 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_banexception.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_censor.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_customtitle.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_dccallow.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_ident.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_noctcp.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_nonotice.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_operjoin.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_safelist.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_securelist.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_services.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_services_account.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_vhost.cpp | 16 |
14 files changed, 39 insertions, 40 deletions
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 152415a91..66991425b 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -141,7 +141,7 @@ public: virtual ~ModuleBanException() { ServerInstance->Modes->DelMode(be); - DELETE(be); + delete be; ServerInstance->UnpublishInterface("ChannelBanList", this); } }; diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 27bb3b741..1159febf8 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -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() diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index df142a089..73f2cda87 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -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; } } } diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index fd51e4d61..fd9e329cd 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -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); } diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 0fef4d33b..16629d700 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -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) diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 3f9608935..5ed69273e 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -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() diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 8bb84c6ce..b2d15f9d7 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -92,7 +92,7 @@ class ModuleNoCTCP : public Module virtual ~ModuleNoCTCP() { ServerInstance->Modes->DelMode(nc); - DELETE(nc); + delete nc; } virtual Version GetVersion() diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index e536328bc..fdec61a7e 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -88,7 +88,7 @@ class ModuleNoNotice : public Module virtual ~ModuleNoNotice() { ServerInstance->Modes->DelMode(nt); - DELETE(nt); + delete nt; } virtual Version GetVersion() diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index 8383de739..45fcf6be8 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -60,7 +60,7 @@ class ModuleOperjoin : public Module if (!operChan.empty()) tokenize(operChan,operChans); - DELETE(conf); + delete conf; } virtual ~ModuleOperjoin() diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index e23a00531..40b8d1b0f 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -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"); } } diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp index d32921455..797088d1c 100644 --- a/src/modules/m_securelist.cpp +++ b/src/modules/m_securelist.cpp @@ -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) diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index 7cf894fbc..c1152b7de 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -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() diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 78fd9b0a8..74e445376 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -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() diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 4654507f6..71f1069a3 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -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 ¶meter) - { - DELETE(Conf); - Conf = new ConfigReader(ServerInstance); - } - virtual Version GetVersion() { return Version(1,1,0,1,VF_VENDOR,API_VERSION); |