summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-24 13:28:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-24 13:28:07 +0000
commit5d407fb44c759524881712a80febb86b4506ddbf (patch)
treef0f426e645518a859ad25284f478854818a92da8 /src/modules
parent009c5b0562c280743033ea6ca2e673201a8e218c (diff)
delete operator tracking in debug mode (using a macro -- live with it.)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3904 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp8
-rw-r--r--src/modules/extra/m_sql.cpp4
-rw-r--r--src/modules/extra/m_sqlauth.cpp10
-rw-r--r--src/modules/extra/m_sqllog.cpp30
-rw-r--r--src/modules/extra/m_sqloper.cpp12
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp6
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp6
-rw-r--r--src/modules/m_alias.cpp4
-rw-r--r--src/modules/m_blockamsg.cpp4
-rw-r--r--src/modules/m_censor.cpp4
-rw-r--r--src/modules/m_chanfilter.cpp6
-rw-r--r--src/modules/m_chanprotect.cpp4
-rw-r--r--src/modules/m_conn_waitpong.cpp10
-rw-r--r--src/modules/m_denychans.cpp4
-rw-r--r--src/modules/m_filter.cpp6
-rw-r--r--src/modules/m_helpop.cpp8
-rw-r--r--src/modules/m_hostchange.cpp6
-rw-r--r--src/modules/m_ident.cpp4
-rw-r--r--src/modules/m_joinflood.cpp4
-rw-r--r--src/modules/m_kicknorejoin.cpp48
-rw-r--r--src/modules/m_messageflood.cpp4
-rw-r--r--src/modules/m_operjoin.cpp4
-rw-r--r--src/modules/m_operlevels.cpp4
-rw-r--r--src/modules/m_opermodes.cpp4
-rw-r--r--src/modules/m_opermotd.cpp2
-rw-r--r--src/modules/m_override.cpp2
-rw-r--r--src/modules/m_park.cpp4
-rw-r--r--src/modules/m_randquote.cpp4
-rw-r--r--src/modules/m_restrictchans.cpp2
-rw-r--r--src/modules/m_safelist.cpp8
-rw-r--r--src/modules/m_silence.cpp4
-rw-r--r--src/modules/m_spanningtree.cpp18
-rw-r--r--src/modules/m_swhois.cpp12
-rw-r--r--src/modules/m_timedbans.cpp2
-rw-r--r--src/modules/m_vhost.cpp4
35 files changed, 133 insertions, 133 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index 267fc71b4..58ca77333 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -91,8 +91,8 @@ class ModuleFilterPCRE : public Module
virtual ~ModuleFilterPCRE()
{
- delete MyConf;
- delete Conf;
+ DELETE(MyConf);
+ DELETE(Conf);
}
void Implements(char* List)
@@ -156,8 +156,8 @@ class ModuleFilterPCRE : public Module
{
// reload our config file on rehash - we must destroy and re-allocate the classes
// to call the constructor again and re-read our data.
- delete Conf;
- delete MyConf;
+ DELETE(Conf);
+ DELETE(MyConf);
Conf = new ConfigReader;
std::string filterfile = Conf->ReadValue("filter","file",0);
// this automatically re-reads the configuration file into the class
diff --git a/src/modules/extra/m_sql.cpp b/src/modules/extra/m_sql.cpp
index ef3fbf21d..1c5da9366 100644
--- a/src/modules/extra/m_sql.cpp
+++ b/src/modules/extra/m_sql.cpp
@@ -333,12 +333,12 @@ class ModuleSQL : public Module
virtual ~ModuleSQL()
{
Connections.clear();
- delete Conf;
+ DELETE(Conf);
}
virtual void OnRehash(const std::string &parameter)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader();
LoadDatabases(Conf);
}
diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp
index d5ccc20d7..f27c0c28b 100644
--- a/src/modules/extra/m_sqlauth.cpp
+++ b/src/modules/extra/m_sqlauth.cpp
@@ -68,7 +68,7 @@ class ModuleSQLAuth : public Module
{
encryption.append("(");
}
- delete Conf;
+ DELETE(Conf);
SQLModule = Srv->FindModule("m_sql.so");
if (!SQLModule)
Srv->Log(DEFAULT,"WARNING: m_sqlauth.so could not initialize because m_sql.so is not loaded. Load the module and rehash your server.");
@@ -170,8 +170,8 @@ class ModuleSQLAuth : public Module
found = false;
}
- delete rowrequest;
- delete rowresult;
+ DELETE(rowrequest);
+ DELETE(rowresult);
}
else
{
@@ -185,8 +185,8 @@ class ModuleSQLAuth : public Module
Request donerequest((char*)query, this, SQLModule);
donerequest.Send();
- delete query;
- delete result;
+ DELETE(query);
+ DELETE(result);
return found;
}
diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp
index 845c3e0d9..84dd8fa43 100644
--- a/src/modules/extra/m_sqllog.cpp
+++ b/src/modules/extra/m_sqllog.cpp
@@ -50,7 +50,7 @@ class ModuleSQLLog : public Module
{
Conf = new ConfigReader();
dbid = Conf->ReadInteger("sqllog","dbid",0,true); // database id of a database configured in m_sql (see m_sql config)
- delete Conf;
+ DELETE(Conf);
SQLModule = Srv->FindModule("m_sql.so");
if (!SQLModule)
Srv->Log(DEFAULT,"WARNING: m_SQLLog.so could not initialize because m_sql.so is not loaded. Load the module and rehash your server.");
@@ -92,18 +92,18 @@ class ModuleSQLLog : public Module
if (rowresult->GetType() == SQL_ROW)
{
nid = atoi(rowresult->GetField("id").c_str());
- delete rowresult;
+ DELETE(rowresult);
}
- delete rowrequest;
- delete result;
+ DELETE(rowrequest);
+ DELETE(result);
}
query->SetQueryType(SQL_DONE);
query->SetConnID(dbid);
Request donerequest((char*)query, this, SQLModule);
donerequest.Send();
- delete query;
+ DELETE(query);
if (nid < 1)
{
@@ -117,9 +117,9 @@ class ModuleSQLLog : public Module
}
if (result2)
- delete result;
+ DELETE(result);
if (query2)
- delete query2;
+ DELETE(query2);
nid = InsertNick(nick);
}
@@ -141,9 +141,9 @@ class ModuleSQLLog : public Module
}
if (result)
- delete result;
+ DELETE(result);
if (query)
- delete query;
+ DELETE(query);
return;
}
@@ -165,18 +165,18 @@ class ModuleSQLLog : public Module
if (rowresult->GetType() == SQL_ROW)
{
hid = atoi(rowresult->GetField("id").c_str());
- delete rowresult;
+ DELETE(rowresult);
}
- delete rowrequest;
- delete result;
+ DELETE(rowrequest);
+ DELETE(result);
}
query->SetQueryType(SQL_DONE);
query->SetConnID(dbid);
Request donerequest((char*)query, this, SQLModule);
donerequest.Send();
- delete query;
+ DELETE(query);
if (hid < 1)
{
@@ -190,9 +190,9 @@ class ModuleSQLLog : public Module
}
if (result)
- delete result2;
+ DELETE(result2);
if (query)
- delete query2;
+ DELETE(query2);
hid = InsertHost(host);
}
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index 5a039d069..8707f1580 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -72,7 +72,7 @@ class ModuleSQLOper : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader();
ReadConfig();
}
@@ -186,7 +186,7 @@ class ModuleSQLOper : public Module
}
}
- delete rowresult;
+ DELETE(rowresult);
}
else
{
@@ -194,8 +194,8 @@ class ModuleSQLOper : public Module
found = false;
}
- delete rowrequest;
- delete result;
+ DELETE(rowrequest);
+ DELETE(result);
}
else
{
@@ -206,13 +206,13 @@ class ModuleSQLOper : public Module
query->SetConnID(dbid);
Request donerequest((char*)query, this, SQLModule);
donerequest.Send();
- delete query;
+ DELETE(query);
return found;
}
virtual ~ModuleSQLOper()
{
- delete Conf;
+ DELETE(Conf);
}
virtual Version GetVersion()
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 52209d44c..5be9e7bcc 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -174,7 +174,7 @@ class ModuleSSLGnuTLS : public Module
// This may be on a large (once a day or week) timer eventually.
GenerateDHParams();
- delete Conf;
+ DELETE(Conf);
}
void GenerateDHParams()
@@ -564,8 +564,8 @@ class ModuleSSLGnuTLS : public Module
metadata->push_back("ON"); // The value to send
Event* event = new Event((char*)metadata,(Module*)this,"send_metadata");
event->Send(); // Trigger the event. We don't care what module picks it up.
- delete event;
- delete metadata;
+ DELETE(event);
+ DELETE(metadata);
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 1e20b1ccf..b1d8af21c 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -210,7 +210,7 @@ class ModuleSSLOpenSSL : public Module
log(DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters");
}
- delete Conf;
+ DELETE(Conf);
}
virtual ~ModuleSSLOpenSSL()
@@ -628,8 +628,8 @@ class ModuleSSLOpenSSL : public Module
metadata->push_back("ON"); // The value to send
Event* event = new Event((char*)metadata,(Module*)this,"send_metadata");
event->Send(); // Trigger the event. We don't care what module picks it up.
- delete event;
- delete metadata;
+ DELETE(event);
+ DELETE(metadata);
}
}
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 80b55e0a4..bd6c001b3 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -79,7 +79,7 @@ class ModuleAlias : public Module
virtual ~ModuleAlias()
{
- delete MyConf;
+ DELETE(MyConf);
}
virtual Version GetVersion()
@@ -150,7 +150,7 @@ class ModuleAlias : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete MyConf;
+ DELETE(MyConf);
MyConf = new ConfigReader;
ReadAliases();
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 95dfa40c4..0472e2417 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -91,7 +91,7 @@ public:
else
action = IBLOCK_KILLOPERS;
- delete Conf;
+ DELETE(Conf);
}
virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated)
@@ -171,7 +171,7 @@ public:
BlockedMessage* m = (BlockedMessage*)user->GetExt("amsgblock");
if(m)
{
- delete m;
+ DELETE(m);
user->Shrink("amsgblock");
}
}
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index ee1a63424..6a5acb54c 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -164,8 +164,8 @@ class ModuleCensor : public Module
irc::string replace = (MyConf->ReadValue("badword","replace",index)).c_str();
censors[pattern] = replace;
}
- delete Conf;
- delete MyConf;
+ DELETE(Conf);
+ DELETE(MyConf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 9e8d36ff8..b9fe2225f 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -67,14 +67,14 @@ class ModuleChanFilter : public Module
if (spamlist)
{
channel->Shrink("spam_list");
- delete spamlist;
+ DELETE(spamlist);
}
}
}
virtual void OnRehash(const std::string &parameter)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader;
// re-read our config options on a rehash
MaxEntries = Conf->ReadInteger("chanfilter","maxsize",0,true);
@@ -195,7 +195,7 @@ class ModuleChanFilter : public Module
virtual ~ModuleChanFilter()
{
- delete Conf;
+ DELETE(Conf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index b6f277c03..0839a48e4 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -81,7 +81,7 @@ class ModuleChanProtect : public Module
virtual void OnRehash(const std::string &parameter)
{
// on a rehash we delete our classes for good measure and create them again.
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader;
// re-read our config options on a rehash
FirstInGetsFounder = Conf->ReadFlag("options","noservices",0);
@@ -318,7 +318,7 @@ class ModuleChanProtect : public Module
virtual ~ModuleChanProtect()
{
- delete Conf;
+ DELETE(Conf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index f67021af5..804026adb 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -21,7 +21,7 @@ char* RandString(unsigned int length)
out[length] = '\0';
- delete tmp;
+ DELETE(tmp);
return (char*)out;
}
@@ -56,7 +56,7 @@ class ModuleWaitPong : public Module
if(Conf->GetError() == CONF_VALUE_NOT_FOUND)
killonbadreply = true;
- delete Conf;
+ DELETE(Conf);
}
void Implements(char* List)
@@ -86,7 +86,7 @@ class ModuleWaitPong : public Module
{
if(strcmp(pingrpl, parameters[0]) == 0)
{
- delete pingrpl;
+ DELETE(pingrpl);
user->Shrink("waitpong_pingstr");
return 1;
}
@@ -113,7 +113,7 @@ class ModuleWaitPong : public Module
if(pingrpl)
{
- delete pingrpl;
+ DELETE(pingrpl);
user->Shrink("waitpong_pingstr");
}
}
@@ -127,7 +127,7 @@ class ModuleWaitPong : public Module
if(pingrpl)
{
- delete pingrpl;
+ DELETE(pingrpl);
user->Shrink("waitpong_pingstr");
}
}
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index cfa96e2b3..67e4da607 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -38,13 +38,13 @@ class ModuleDenyChannels : public Module
virtual void OnRehash(const std::string &param)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader;
}
virtual ~ModuleDenyChannels()
{
- delete Conf;
+ DELETE(Conf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 929ae6456..d183ce2f7 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -140,7 +140,7 @@ class ModuleFilter : public Module
}
for (filter_t::iterator n = filters.begin(); n != filters.end(); n++)
{
- delete n->second;
+ DELETE(n->second);
}
filters.clear();
for (int index = 0; index < MyConf->Enumerate("keyword"); index++)
@@ -156,8 +156,8 @@ class ModuleFilter : public Module
filters[pattern] = x;
}
Srv->Log(DEFAULT,std::string("m_filter: read configuration from ")+filterfile);
- delete Conf;
- delete MyConf;
+ DELETE(Conf);
+ DELETE(MyConf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 966f645d3..b6c723ca7 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -216,9 +216,9 @@ class ModuleHelpop : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete conf;
+ DELETE(conf);
if (helpop)
- delete helpop;
+ DELETE(helpop);
ReadConfig();
}
@@ -242,8 +242,8 @@ class ModuleHelpop : public Module
virtual ~ModuleHelpop()
{
- delete conf;
- delete helpop;
+ DELETE(conf);
+ DELETE(helpop);
}
virtual Version GetVersion()
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index a4a5a8b08..21333a853 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -52,7 +52,7 @@ class ModuleHostChange : public Module
virtual ~ModuleHostChange()
{
- delete Conf;
+ DELETE(Conf);
}
Priority Prioritize()
@@ -67,12 +67,12 @@ class ModuleHostChange : public Module
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++)
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 9136d1349..2669c9254 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -149,7 +149,7 @@ class ModuleIdent : public Module
IdentTimeout = Conf->ReadInteger("ident","timeout",0,true);
if (!IdentTimeout)
IdentTimeout = 1;
- delete Conf;
+ DELETE(Conf);
}
ModuleIdent(Server* Me)
@@ -187,7 +187,7 @@ class ModuleIdent : public Module
else
{
Srv->SendServ(user->fd,"NOTICE "+std::string(user->nick)+" :*** Could not find your ident, using "+std::string(user->ident)+" instead.");
- delete ident;
+ DELETE(ident);
}
}
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index b1dc5c657..ae31ab67c 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -165,7 +165,7 @@ class ModuleJoinFlood : public Module
if (c->GetExt("joinflood"))
{
joinfloodsettings *f = (joinfloodsettings*)c->GetExt("joinflood");
- delete f;
+ DELETE(f);
c->Shrink("joinflood");
}
}
@@ -211,7 +211,7 @@ class ModuleJoinFlood : public Module
if (chan->GetExt("joinflood"))
{
joinfloodsettings *f = (joinfloodsettings*)chan->GetExt("joinflood");
- delete f;
+ DELETE(f);
chan->Shrink("joinflood");
}
}
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index 18fd995ad..3910bc030 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -46,7 +46,7 @@ public:
if (dl)
{
- delete dl;
+ DELETE(dl);
c->Shrink("norejoinusers");
}
}
@@ -95,38 +95,38 @@ public:
if (!dl->size())
{
// Now it's empty..
- delete dl;
- chan->Shrink("norejoinusers");
+ DELETE(dl);
+ chan->Shrink("norejoinusers");
+ }
}
}
+ return 0;
}
- return 0;
- }
-
- virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
- {
- if (chan->IsModeSet('J') && (source != user))
+
+ virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
{
- delaylist* dl = (delaylist*)chan->GetExt("norejoinusers");
-
- if (!dl)
+ if (chan->IsModeSet('J') && (source != user))
{
- dl = new delaylist;
- chan->Extend("norejoinusers", (char*)dl);
+ delaylist* dl = (delaylist*)chan->GetExt("norejoinusers");
+
+ if (!dl)
+ {
+ dl = new delaylist;
+ chan->Extend("norejoinusers", (char*)dl);
+ }
+
+ log(DEBUG, "m_kicknorejoin.so: setting record for %s, %d second delay", user->nick, strtoint(chan->GetModeParameter('J')));
+ (*dl)[user] = time(NULL) + strtoint(chan->GetModeParameter('J'));
}
-
- log(DEBUG, "m_kicknorejoin.so: setting record for %s, %d second delay", user->nick, strtoint(chan->GetModeParameter('J')));
- (*dl)[user] = time(NULL) + strtoint(chan->GetModeParameter('J'));
}
- }
-
- virtual void OnChannelDelete(chanrec* chan)
- {
- delaylist* dl = (delaylist*)chan->GetExt("norejoinusers");
- if (dl)
+ virtual void OnChannelDelete(chanrec* chan)
{
- delete dl;
+ delaylist* dl = (delaylist*)chan->GetExt("norejoinusers");
+
+ if (dl)
+ {
+ DELETE(dl);
chan->Shrink("norejoinusers");
}
}
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 61682c26f..c5df268ea 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -163,7 +163,7 @@ class ModuleMsgFlood : public Module
if (c->GetExt("flood"))
{
floodsettings *f = (floodsettings*)c->GetExt("flood");
- delete f;
+ DELETE(f);
c->Shrink("flood");
}
}
@@ -219,7 +219,7 @@ class ModuleMsgFlood : public Module
if (chan->GetExt("flood"))
{
floodsettings *f = (floodsettings*)chan->GetExt("flood");
- delete f;
+ DELETE(f);
chan->Shrink("flood");
}
}
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index 2517b385f..c33400954 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -32,13 +32,13 @@ class ModuleOperjoin : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete conf;
+ DELETE(conf);
conf = new ConfigReader;
}
virtual ~ModuleOperjoin()
{
- delete conf;
+ DELETE(conf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index 306dbe587..8df45f0fc 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -28,7 +28,7 @@ class ModuleOperLevels : public Module
virtual ~ModuleOperLevels()
{
- delete conf;
+ DELETE(conf);
}
void Implements(char* List)
@@ -38,7 +38,7 @@ class ModuleOperLevels : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete conf;
+ DELETE(conf);
conf = new ConfigReader;
}
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index 6bf823d31..c46b8beaf 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -45,13 +45,13 @@ class ModuleModesOnOper : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader;
}
virtual ~ModuleModesOnOper()
{
- delete Conf;
+ DELETE(Conf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index c43775db8..5f9dafa65 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -21,7 +21,7 @@ void LoadOperMOTD()
filename = conf->ReadValue("opermotd","file",0);
opermotd->LoadFile(filename);
- delete conf;
+ DELETE(conf);
}
void ShowOperMOTD(userrec* user)
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 16c3a5295..64ce9cff6 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -58,7 +58,7 @@ class ModuleOverride : public Module
overrides[typen] = tokenlist;
}
- delete Conf;
+ DELETE(Conf);
}
void Implements(char* List)
diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp
index 935efa39c..7abe31baf 100644
--- a/src/modules/m_park.cpp
+++ b/src/modules/m_park.cpp
@@ -176,7 +176,7 @@ class cmd_unpark : public command_t
timebuf[strlen(timebuf)-1] = '\0';
WriteServ(unpark->fd,"NOTICE %s :From %s at %s: \2%s\2",unpark->nick,i->from.c_str(),timebuf,i->text.c_str());
}
- delete awy;
+ DELETE(awy);
unpark->Shrink("park_awaylog");
unpark->Shrink("park_key");
for (parkinfo::iterator j = pinfo.begin(); j != pinfo.end(); j++)
@@ -209,7 +209,7 @@ class ModulePark : public Module
ParkMaxTime = Conf->ReadInteger("park","maxtime",0,true);
ConcurrentParks = Conf->ReadInteger("park","maxperip",0,true);
ParkMaxMsgs = Conf->ReadInteger("park","maxmessages",0,true);
- delete Conf;
+ DELETE(Conf);
}
ModulePark(Server* Me)
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index a3b4c4a7e..64c967ae8 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -122,8 +122,8 @@ class ModuleRandQuote : public Module
virtual ~ModuleRandQuote()
{
- delete conf;
- delete quotes;
+ DELETE(conf);
+ DELETE(quotes);
}
virtual Version GetVersion()
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index cd94ba3fe..a901dfde6 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -42,7 +42,7 @@ class ModuleRestrictChans : public Module
irc::string channel = txt.c_str();
allowchans[channel] = 1;
}
- delete MyConf;
+ DELETE(MyConf);
}
public:
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index e9ea965f9..0ba1f28a1 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -80,7 +80,7 @@ class ListTimer : public InspTimer
if (ld->list_position > Srv->GetChannelCount())
{
u->Shrink("safelist_cache");
- delete ld;
+ DELETE(ld);
listusers.erase(iter);
go_again = true;
break;
@@ -202,7 +202,7 @@ class ModuleSafeList : public Module
return 1;
}
- delete last_list_time;
+ DELETE(last_list_time);
user->Shrink("safelist_last");
}
@@ -229,7 +229,7 @@ class ModuleSafeList : public Module
if (ld)
{
u->Shrink("safelist_cache");
- delete ld;
+ DELETE(ld);
}
for (UserList::iterator iter = listusers.begin(); iter != listusers.end(); iter++)
{
@@ -243,7 +243,7 @@ class ModuleSafeList : public Module
time_t* last_list_time = (time_t*)u->GetExt("safelist_last");
if (last_list_time)
{
- delete last_list_time;
+ DELETE(last_list_time);
u->Shrink("safelist_last");
}
}
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 4beda4423..dea78c526 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -91,7 +91,7 @@ class cmd_silence : public command_t
{
// tidy up -- if a user's list is empty, theres no use having it
// hanging around in the user record.
- delete sl;
+ DELETE(sl);
user->Shrink("silence_list");
}
}
@@ -153,7 +153,7 @@ class ModuleSilence : public Module
silencelist* sl = (silencelist*)user->GetExt("silence_list");
if (sl)
{
- delete sl;
+ DELETE(sl);
user->Shrink("silence_list");
}
}
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index eb4db1335..c36005fb2 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -455,7 +455,7 @@ class TreeServer
TreeServer* s = (TreeServer*)*a;
s->Tidy();
Children.erase(a);
- delete s;
+ DELETE(s);
stillchildren = true;
break;
}
@@ -658,9 +658,9 @@ class TreeSocket : public InspSocket
~TreeSocket()
{
if (ctx_in)
- delete ctx_in;
+ DELETE(ctx_in);
if (ctx_out)
- delete ctx_out;
+ DELETE(ctx_out);
}
void InitAES(std::string key,std::string SName)
@@ -887,7 +887,7 @@ class TreeSocket : public InspSocket
SquitServer(from, Current);
Current->Tidy();
Current->GetParent()->DelChild(Current);
- delete Current;
+ DELETE(Current);
WriteOpers("Netsplit complete, lost \002%d\002 users on \002%d\002 servers.", num_lost_users, num_lost_servers);
}
else
@@ -911,7 +911,7 @@ class TreeSocket : public InspSocket
}
Srv->SendMode(modelist,params.size(),who);
DoOneToAllButSender(source,"FMODE",params,source);
- delete who;
+ DELETE(who);
return true;
}
@@ -2839,7 +2839,7 @@ void ReadConfiguration(bool rebind)
{
log(DEFAULT,"m_spanningtree: Warning: Failed to bind server port %d",Port);
listener->Close();
- delete listener;
+ DELETE(listener);
}
}
}
@@ -2889,7 +2889,7 @@ void ReadConfiguration(bool rebind)
}
}
}
- delete Conf;
+ DELETE(Conf);
}
@@ -3229,7 +3229,7 @@ class ModuleSpanningTree : public Module
else
{
WriteOpers("*** AUTOCONNECT: Error autoconnecting \002%s\002: %s.",x->Name.c_str(),strerror(errno));
- delete newsocket;
+ DELETE(newsocket);
}
}
}
@@ -3291,7 +3291,7 @@ class ModuleSpanningTree : public Module
else
{
WriteServ(user->fd,"NOTICE %s :*** CONNECT: Error connecting \002%s\002: %s.",user->nick,x->Name.c_str(),strerror(errno));
- delete newsocket;
+ DELETE(newsocket);
}
return 1;
}
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index a4d947102..98ed007d0 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -56,7 +56,7 @@ class cmd_swhois : public command_t
WriteOpers("*** %s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick, dest->nick, text->c_str(), line.c_str());
dest->Shrink("swhois");
- delete text;
+ DELETE(text);
}
else if(!Srv->IsUlined(user->server))
{
@@ -87,7 +87,7 @@ class ModuleSWhois : public Module
void OnRehash(const std::string &parameter)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader();
}
@@ -138,7 +138,7 @@ class ModuleSWhois : public Module
{
std::string* swhois = (std::string*)field;
user->Shrink("swhois");
- delete swhois;
+ DELETE(swhois);
}
}
@@ -153,7 +153,7 @@ class ModuleSWhois : public Module
{
std::string* swhois = (std::string*)field;
user->Shrink("swhois");
- delete swhois;
+ DELETE(swhois);
}
}
}
@@ -195,7 +195,7 @@ class ModuleSWhois : public Module
if(std::string* old = (std::string*)user->GetExt("swhois"))
{
user->Shrink("swhois");
- delete old;
+ DELETE(old);
}
std::string* text = new std::string(swhois);
@@ -209,7 +209,7 @@ class ModuleSWhois : public Module
virtual ~ModuleSWhois()
{
- delete Conf;
+ DELETE(Conf);
}
virtual Version GetVersion()
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 98a76ad63..b1b0de25f 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -170,7 +170,7 @@ class ModuleTimedBans : public Module
temp->fd = FD_MAGIC_NUMBER;
temp->server = "";
Srv->SendMode(setban,3,temp);
- delete temp;
+ DELETE(temp);
}
// we used to delete the item here, but we dont need to as the servermode above does it for us,
break;
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp
index a2e77f091..f419772d4 100644
--- a/src/modules/m_vhost.cpp
+++ b/src/modules/m_vhost.cpp
@@ -72,7 +72,7 @@ class ModuleVHost : public Module
virtual ~ModuleVHost()
{
- delete Conf;
+ DELETE(Conf);
}
void Implements(char* List)
@@ -82,7 +82,7 @@ class ModuleVHost : public Module
virtual void OnRehash(const std::string &parameter)
{
- delete Conf;
+ DELETE(Conf);
Conf = new ConfigReader;
}