summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-03-14 12:59:19 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-03-14 12:59:19 +0100
commitda45f24ff1ab4fbac1b674c820796e9b3850a380 (patch)
treecae234ce6d5c645252587c22718bc23a8241f3ab /src
parent146d85b5dea9ecb803a9a47c68b5489905634125 (diff)
Change allocation of InspIRCd::chanlist to be physically part of the object containing it
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp8
-rw-r--r--src/helperfuncs.cpp4
-rw-r--r--src/inspircd.cpp4
3 files changed, 6 insertions, 10 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 99c25fbfc..fcfb524ce 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -42,7 +42,7 @@ namespace
Channel::Channel(const std::string &cname, time_t ts)
: name(cname), age(ts), topicset(0)
{
- if (!ServerInstance->chanlist->insert(std::make_pair(cname, this)).second)
+ if (!ServerInstance->chanlist.insert(std::make_pair(cname, this)).second)
throw CoreException("Cannot create duplicate channel " + cname);
}
@@ -88,12 +88,12 @@ void Channel::CheckDestroy()
if (res == MOD_RES_DENY)
return;
- chan_hash::iterator iter = ServerInstance->chanlist->find(this->name);
+ chan_hash::iterator iter = ServerInstance->chanlist.find(this->name);
/* kill the record */
- if (iter != ServerInstance->chanlist->end())
+ if (iter != ServerInstance->chanlist.end())
{
FOREACH_MOD(OnChannelDelete, (this));
- ServerInstance->chanlist->erase(iter);
+ ServerInstance->chanlist.erase(iter);
}
ClearInvites();
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 6a831bb04..850eaf4c0 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -70,9 +70,9 @@ User *InspIRCd::FindUUID(const std::string &uid)
Channel* InspIRCd::FindChan(const std::string &chan)
{
- chan_hash::iterator iter = chanlist->find(chan);
+ chan_hash::iterator iter = chanlist.find(chan);
- if (iter == chanlist->end())
+ if (iter == chanlist.end())
/* Couldn't find it */
return NULL;
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 101df432f..50899435b 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -138,7 +138,6 @@ void InspIRCd::Cleanup()
DeleteZero(this->BanCache);
DeleteZero(this->SNO);
DeleteZero(this->Config);
- DeleteZero(this->chanlist);
DeleteZero(this->PI);
DeleteZero(this->Threads);
DeleteZero(this->Timers);
@@ -266,7 +265,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
this->Threads = 0;
this->PI = 0;
this->Users = 0;
- this->chanlist = 0;
this->Config = 0;
this->SNO = 0;
this->BanCache = 0;
@@ -295,8 +293,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
// Create base manager classes early, so nothing breaks
this->Users = new UserManager;
- this->chanlist = new chan_hash();
-
this->Config = new ServerConfig;
this->SNO = new SnomaskManager;
this->BanCache = new BanCacheManager;