aboutsummaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-06-21 04:25:45 +0100
committerGravatar Sadie Powell2021-05-08 15:31:50 +0100
commit0c750c060839f9018ca129bd7456184792ea0dc0 (patch)
tree43aa8d0a593afa292e2922d2481b2349e0dc8dfd /src/channels.cpp
parentMerge branch 'insp3' into master. (diff)
Move channel logic from InspIRCd to the new ChannelManager class.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 12c9aeeff..6b885735c 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -37,7 +37,7 @@ Channel::Channel(const std::string &cname, time_t ts)
: name(cname)
, age(ts)
{
- if (!ServerInstance->chanlist.emplace(cname, this).second)
+ if (!ServerInstance->Channels.GetChans().emplace(cname, this).second)
throw CoreException("Cannot create duplicate channel " + cname);
}
@@ -94,12 +94,12 @@ void Channel::CheckDestroy()
return;
// If the channel isn't in chanlist then it is already in the cull list, don't add it again
- chan_hash::iterator iter = ServerInstance->chanlist.find(this->name);
- if ((iter == ServerInstance->chanlist.end()) || (iter->second != this))
+ ChannelMap::iterator iter = ServerInstance->Channels.GetChans().find(this->name);
+ if ((iter == ServerInstance->Channels.GetChans().end()) || (iter->second != this))
return;
FOREACH_MOD(OnChannelDelete, (this));
- ServerInstance->chanlist.erase(iter);
+ ServerInstance->Channels.GetChans().erase(iter);
ServerInstance->GlobalCulls.AddItem(this);
}
@@ -197,7 +197,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co
if (cname.length() > ServerInstance->Config->Limits.MaxChannel)
cname.resize(ServerInstance->Config->Limits.MaxChannel);
- Channel* chan = ServerInstance->FindChan(cname);
+ Channel* chan = ServerInstance->Channels.Find(cname);
bool created_by_local = (chan == NULL); // Flag that will be passed to modules in the OnUserJoin() hook later
std::string privs; // Prefix mode(letter)s to give to the joining user