summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra')
-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
7 files changed, 38 insertions, 38 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);
}
}