summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-24 12:20:02 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-24 12:20:02 +0200
commit86092ec5919a5b08391ea7291b9338b3745b6e0a (patch)
treef665fa3fad5899ed1663d8f5604e09f71989559f
parenta2860d06e429f35a4bacf4ea8a01eeeed1472285 (diff)
Change allocation of InspIRCd::SNO to be physically part of the object containing it using fakederef
-rw-r--r--include/inspircd.h2
-rw-r--r--include/snomasks.h2
-rw-r--r--src/inspircd.cpp3
3 files changed, 2 insertions, 5 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index e63092f23..3909b1328 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -385,7 +385,7 @@ class CoreExport InspIRCd
/** Snomask manager - handles routing of snomask messages
* to opers.
*/
- SnomaskManager* SNO;
+ SnomaskManager SNO;
/** Timer manager class, triggers Timer timer events
*/
diff --git a/include/snomasks.h b/include/snomasks.h
index df4faab47..bd08773e9 100644
--- a/include/snomasks.h
+++ b/include/snomasks.h
@@ -72,7 +72,7 @@ class Snomask
* Modules and the core can enable and disable snomask characters. If they do,
* then sending snomasks using these characters becomes possible.
*/
-class CoreExport SnomaskManager
+class CoreExport SnomaskManager : public fakederef<SnomaskManager>
{
Snomask masks[26];
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 553e09b73..d873916f4 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -126,7 +126,6 @@ void InspIRCd::Cleanup()
DeleteZero(this->FakeClient);
DeleteZero(this->Users);
DeleteZero(this->XLines);
- DeleteZero(this->SNO);
DeleteZero(this->Config);
SocketEngine::Deinit();
Logs->CloseLogs();
@@ -250,7 +249,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
// Initialize so that if we exit before proper initialization they're not deleted
this->Users = 0;
this->Config = 0;
- this->SNO = 0;
this->XLines = 0;
this->ConfigThread = NULL;
this->FakeClient = NULL;
@@ -264,7 +262,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
this->Users = new UserManager;
this->Config = new ServerConfig;
- this->SNO = new SnomaskManager;
dynamic_reference_base::reset_all();
this->XLines = new XLineManager;