summaryrefslogtreecommitdiff
path: root/src/regchannel.cpp
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-14 20:35:38 -0400
committerAdam <Adam@anope.org>2010-06-18 21:01:53 -0400
commitf049124905bd9f53439293e873003cb027a17b91 (patch)
tree352ed9251fd47055dd770aa2d5eabb20247e4b43 /src/regchannel.cpp
parent81a45520a773732c9f46785f27aa1956150775d7 (diff)
Rewrote the hashing system to use std::tr1::unordered_map
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 39feed45a..1da77d912 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -23,7 +23,6 @@ ChannelInfo::ChannelInfo(const std::string &chname)
if (chname.empty())
throw CoreException("Empty channel passed to ChannelInfo constructor");
- next = prev = NULL;
founder = successor = NULL;
desc = url = email = last_topic = forbidby = forbidreason = NULL;
last_topic_time = 0;
@@ -61,7 +60,8 @@ ChannelInfo::ChannelInfo(const std::string &chname)
this->ttb[i] = 0;
reset_levels(this);
- alpha_insert_chan(this);
+
+ RegisteredChannelList[this->name.c_str()] = this;
}
/** Default destructor, cleans up the channel complete and removes it from the internal list
@@ -84,12 +84,8 @@ ChannelInfo::~ChannelInfo()
this->c->ci = NULL;
}
- if (this->next)
- this->next->prev = this->prev;
- if (this->prev)
- this->prev->next = this->next;
- else
- chanlists[static_cast<unsigned char>(tolower(this->name[1]))] = this->next;
+ RegisteredChannelList.erase(this->name.c_str());
+
if (this->desc)
delete [] this->desc;
if (this->url)
@@ -654,7 +650,7 @@ bool ChannelInfo::CheckKick(User *user)
}
/* Join ChanServ */
- ircdproto->SendJoin(findbot(Config.s_ChanServ), this->name.c_str(), this->c->creation_time);
+ ircdproto->SendJoin(ChanServ, this->name.c_str(), this->c->creation_time);
/* Set a timer for this channel to part ChanServ later */
new ChanServTimer(this->c);