aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_permchannels.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/modules/m_permchannels.cpp
parentMerge branch 'insp3' into master. (diff)
Move channel logic from InspIRCd to the new ChannelManager class.
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r--src/modules/m_permchannels.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index cbafba911..fc8a82f65 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -82,7 +82,7 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list
<< "# Any changes to this file will be automatically overwritten." << std::endl
<< std::endl;
- for (const auto& [_, chan] : ServerInstance->GetChans())
+ for (const auto& [_, chan] : ServerInstance->Channels.GetChans())
{
if (!chan->IsModeSet(permchanmode))
continue;
@@ -200,14 +200,13 @@ public:
std::string channel = tag->getString("channel");
std::string modes = tag->getString("modes");
- if (!ServerInstance->IsChannel(channel))
+ if (!ServerInstance->Channels.IsChannel(channel))
{
ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")");
continue;
}
- Channel *c = ServerInstance->FindChan(channel);
-
+ Channel* c = ServerInstance->Channels.Find(channel);
if (!c)
{
time_t TS = tag->getInt("ts", ServerInstance->Time(), 1);