diff options
author | Sadie Powell <sadie@witchery.services> | 2024-10-02 11:11:16 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-10-02 11:12:24 +0100 |
commit | 8232759a924e5bd8f7fa5a425dcb930bba4ef3fb (patch) | |
tree | b112914c4a945e04bb35e4de0e05deaca33a6b4d /modules/protocol/bahamut.cpp | |
parent | b006966d25888857f777892fd3412d8c6da6af5d (diff) |
Change Channel::SetModesInternal to take a split mode change.
Diffstat (limited to 'modules/protocol/bahamut.cpp')
-rw-r--r-- | modules/protocol/bahamut.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index f6d9260e3..c447e1371 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -312,12 +312,8 @@ struct IRCDMessageMode final Channel *c = Channel::Find(params[0]); auto ts = IRCD->ExtractTimestamp(params[1]); - Anope::string modes = params[2]; - for (unsigned int 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); } else { @@ -400,11 +396,12 @@ struct IRCDMessageSJoin final void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { Anope::string modes; + std::vector<Anope::string> modeparams; if (params.size() >= 4) - for (unsigned i = 2; i < params.size(); ++i) - modes += " " + params[i]; - if (!modes.empty()) - modes.erase(modes.begin()); + { + modes = params[2]; + modeparams = { params.begin() + 3, params.end() }; + } std::list<Message::Join::SJoinUser> users; @@ -445,7 +442,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, modes, modeparams, users); } }; |