summaryrefslogtreecommitdiff
path: root/modules/protocol/hybrid.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-10-02 11:11:16 +0100
committerSadie Powell <sadie@witchery.services>2024-10-02 11:12:24 +0100
commit8232759a924e5bd8f7fa5a425dcb930bba4ef3fb (patch)
treeb112914c4a945e04bb35e4de0e05deaca33a6b4d /modules/protocol/hybrid.cpp
parentb006966d25888857f777892fd3412d8c6da6af5d (diff)
Change Channel::SetModesInternal to take a split mode change.
Diffstat (limited to 'modules/protocol/hybrid.cpp')
-rw-r--r--modules/protocol/hybrid.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index 658a4196e..48d952b90 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -547,14 +547,6 @@ struct IRCDMessageSJoin final
/* :0MC SJOIN 1654877335 #nether +nt :@0MCAAAAAB +0MCAAAAAC */
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override
{
- Anope::string modes;
-
- for (unsigned i = 2; i < params.size() - 1; ++i)
- modes += " " + params[i];
-
- if (!modes.empty())
- modes.erase(modes.begin());
-
std::list<Message::Join::SJoinUser> users;
spacesepstream sep(params[params.size() - 1]);
@@ -582,7 +574,7 @@ struct IRCDMessageSJoin final
}
auto ts = IRCD->ExtractTimestamp(params[0]);
- Message::Join::SJoin(source, params[1], ts, modes, users);
+ Message::Join::SJoin(source, params[1], ts, params[2], { params.begin() + 3, params.end() - 1 }, users);
}
};
@@ -637,13 +629,9 @@ struct IRCDMessageTMode final
{
auto ts = IRCD->ExtractTimestamp(params[0]);
Channel *c = Channel::Find(params[1]);
- Anope::string modes = params[2];
-
- for (unsigned i = 3; i < params.size(); ++i)
- modes += " " + params[i];
if (c)
- c->SetModesInternal(source, modes, ts);
+ c->SetModesInternal(source, params[2], { params.begin() + 3, params.end() }, ts);
}
};