aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
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_spanningtree
parentMerge branch 'insp3' into master. (diff)
Move channel logic from InspIRCd to the new ChannelManager class.
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp4
-rw-r--r--src/modules/m_spanningtree/fmode.cpp4
-rw-r--r--src/modules/m_spanningtree/ftopic.cpp2
-rw-r--r--src/modules/m_spanningtree/ijoin.cpp4
-rw-r--r--src/modules/m_spanningtree/metadata.cpp4
-rw-r--r--src/modules/m_spanningtree/netburst.cpp2
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp2
-rw-r--r--src/modules/m_spanningtree/svsjoin.cpp2
-rw-r--r--src/modules/m_spanningtree/svspart.cpp2
9 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index 5e32b4138..350145e23 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -116,7 +116,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, Params& params)
time_t TS = ServerCommand::ExtractTS(params[1]);
const std::string& channel = params[0];
- Channel* chan = ServerInstance->FindChan(channel);
+ Channel* chan = ServerInstance->Channels.Find(channel);
bool apply_other_sides_modes = true;
TreeServer* const sourceserver = TreeServer::Get(srcuser);
@@ -152,7 +152,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, Params& params)
// XXX: If the channel does not exist in the chan hash at this point, create it so the remote modes can be applied on it.
// This happens to 0-user permanent channels on the losing side, because those are removed (from the chan hash, then
// deleted later) as soon as the permchan mode is removed from them.
- if (ServerInstance->FindChan(channel) == NULL)
+ if (ServerInstance->Channels.Find(channel) == NULL)
{
chan = new Channel(channel, TS);
}
diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp
index d836b05e5..e59812efa 100644
--- a/src/modules/m_spanningtree/fmode.cpp
+++ b/src/modules/m_spanningtree/fmode.cpp
@@ -30,7 +30,7 @@ CmdResult CommandFMode::Handle(User* who, Params& params)
{
time_t TS = ServerCommand::ExtractTS(params[1]);
- Channel* const chan = ServerInstance->FindChan(params[0]);
+ Channel* const chan = ServerInstance->Channels.Find(params[0]);
if (!chan)
// Channel doesn't exist
return CmdResult::FAILURE;
@@ -63,7 +63,7 @@ CmdResult CommandLMode::Handle(User* who, Params& params)
// :<sid> LMODE <chan> <chants> <modechr> [<mask> <setts> <setter>]+
time_t chants = ServerCommand::ExtractTS(params[1]);
- Channel* const chan = ServerInstance->FindChan(params[0]);
+ Channel* const chan = ServerInstance->Channels.Find(params[0]);
if (!chan)
return CmdResult::FAILURE; // Channel doesn't exist.
diff --git a/src/modules/m_spanningtree/ftopic.cpp b/src/modules/m_spanningtree/ftopic.cpp
index 243d2e398..cf124cb7b 100644
--- a/src/modules/m_spanningtree/ftopic.cpp
+++ b/src/modules/m_spanningtree/ftopic.cpp
@@ -28,7 +28,7 @@
/** FTOPIC command */
CmdResult CommandFTopic::Handle(User* user, Params& params)
{
- Channel* c = ServerInstance->FindChan(params[0]);
+ Channel* c = ServerInstance->Channels.Find(params[0]);
if (!c)
return CmdResult::FAILURE;
diff --git a/src/modules/m_spanningtree/ijoin.cpp b/src/modules/m_spanningtree/ijoin.cpp
index 3ffc5d9e2..38d5edebe 100644
--- a/src/modules/m_spanningtree/ijoin.cpp
+++ b/src/modules/m_spanningtree/ijoin.cpp
@@ -27,7 +27,7 @@
CmdResult CommandIJoin::HandleRemote(RemoteUser* user, Params& params)
{
- Channel* chan = ServerInstance->FindChan(params[0]);
+ Channel* chan = ServerInstance->Channels.Find(params[0]);
if (!chan)
{
// Desync detected, recover
@@ -60,7 +60,7 @@ CmdResult CommandIJoin::HandleRemote(RemoteUser* user, Params& params)
CmdResult CommandResync::HandleServer(TreeServer* server, CommandBase::Params& params)
{
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Resyncing " + params[0]);
- Channel* chan = ServerInstance->FindChan(params[0]);
+ Channel* chan = ServerInstance->Channels.Find(params[0]);
if (!chan)
{
// This can happen for a number of reasons, safe to ignore
diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp
index aabd4cbbc..f3bc66f77 100644
--- a/src/modules/m_spanningtree/metadata.cpp
+++ b/src/modules/m_spanningtree/metadata.cpp
@@ -51,7 +51,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params)
if (!u)
return CmdResult::FAILURE; // User does not exist.
- Channel* c = ServerInstance->FindChan(params[2]);
+ Channel* c = ServerInstance->Channels.Find(params[2]);
if (!c)
return CmdResult::FAILURE; // Channel does not exist.
@@ -77,7 +77,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params)
if (params.size() < 3)
throw ProtocolException("Insufficient parameters for channel METADATA");
- Channel* c = ServerInstance->FindChan(params[0]);
+ Channel* c = ServerInstance->Channels.Find(params[0]);
if (!c)
return CmdResult::FAILURE;
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp
index a72f5f6ce..30476953d 100644
--- a/src/modules/m_spanningtree/netburst.cpp
+++ b/src/modules/m_spanningtree/netburst.cpp
@@ -112,7 +112,7 @@ void TreeSocket::DoBurst(TreeServer* s)
this->SendUsers(bs);
// Sync all channels
- for (const auto& [_, chan] : ServerInstance->GetChans())
+ for (const auto& [_, chan] : ServerInstance->Channels.GetChans())
SyncChannel(chan, bs);
// Send all xlines
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index eb3bc4043..dc75d054c 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -97,7 +97,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, CommandBase* thiscm
}
if (dest[0] == '#')
{
- Channel* c = ServerInstance->FindChan(dest);
+ Channel* c = ServerInstance->Channels.Find(dest);
if (!c)
return;
// TODO OnBuildExemptList hook was here
diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp
index 4eb47587f..1458e2ece 100644
--- a/src/modules/m_spanningtree/svsjoin.cpp
+++ b/src/modules/m_spanningtree/svsjoin.cpp
@@ -29,7 +29,7 @@
CmdResult CommandSVSJoin::Handle(User* user, Params& parameters)
{
// Check for valid channel name
- if (!ServerInstance->IsChannel(parameters[1]))
+ if (!ServerInstance->Channels.IsChannel(parameters[1]))
return CmdResult::FAILURE;
// Check target exists
diff --git a/src/modules/m_spanningtree/svspart.cpp b/src/modules/m_spanningtree/svspart.cpp
index 12b314d3a..6e5217ace 100644
--- a/src/modules/m_spanningtree/svspart.cpp
+++ b/src/modules/m_spanningtree/svspart.cpp
@@ -32,7 +32,7 @@ CmdResult CommandSVSPart::Handle(User* user, Params& parameters)
if (!u)
return CmdResult::FAILURE;
- Channel* c = ServerInstance->FindChan(parameters[1]);
+ Channel* c = ServerInstance->Channels.Find(parameters[1]);
if (!c)
return CmdResult::FAILURE;