summaryrefslogtreecommitdiff
path: root/src/messages.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 /src/messages.cpp
parentb006966d25888857f777892fd3412d8c6da6af5d (diff)
Change Channel::SetModesInternal to take a split mode change.
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index d906e83d4..9e6f6ebb0 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -98,11 +98,11 @@ void Join::Run(MessageSource &source, const std::vector<Anope::string> &params,
users.emplace_back(ChannelStatus(), user);
Channel *chan = Channel::Find(channel);
- SJoin(source, channel, chan ? chan->creation_time : Anope::CurTime, "", users);
+ SJoin(source, channel, chan ? chan->creation_time : Anope::CurTime, "", {}, users);
}
}
-void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list<SJoinUser> &users)
+void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users)
{
bool created;
Channel *c = Channel::FindOrCreate(chan, created, ts ? ts : Anope::CurTime);
@@ -128,7 +128,7 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
/* If we are syncing, mlock is checked later in Channel::Sync. It is important to not check it here
* so that Channel::SetCorrectModes can correctly detect the presence of channel mode +r.
*/
- c->SetModesInternal(source, modes, ts, !c->syncing);
+ c->SetModesInternal(source, modes, modeparams, ts, !c->syncing);
for (const auto &[status, u] : users)
{
@@ -223,7 +223,7 @@ void Message::Mode::Run(MessageSource &source, const std::vector<Anope::string>
Channel *c = Channel::Find(params[0]);
if (c)
- c->SetModesInternal(source, buf.substr(1), 0);
+ c->SetModesInternal(source, params[1], { params.begin() + 2, params.end() });
}
else
{