diff options
| author | 2026-03-01 18:00:35 +0000 | |
|---|---|---|
| committer | 2026-03-01 18:05:14 +0000 | |
| commit | 5be0c87fd0c30f46e038e78c080bd5d6b10b3eb3 (patch) | |
| tree | 3970f653ab9c0cda1e1b58aaf86f6773bbe3052b /modules/spanningtree/compat.cpp | |
| parent | Merge the chg* and set* modules. (diff) | |
Run incoming ENCAP commands through the old protocol preprocessor.
Diffstat (limited to 'modules/spanningtree/compat.cpp')
| -rw-r--r-- | modules/spanningtree/compat.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/spanningtree/compat.cpp b/modules/spanningtree/compat.cpp index 426dae490..e975262d3 100644 --- a/modules/spanningtree/compat.cpp +++ b/modules/spanningtree/compat.cpp @@ -159,6 +159,19 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, Comm // CHG* and SET* were merged in v5. cmd.replace(0, 3, "SET"); } + else if (irc::equals(cmd, "ENCAP")) + { + if (params.size() < 2) + return false; // Malformed. + + // :<uuid> ENCAP <target> <command> [<params>...]; + CommandBase::Params newparams(params.begin() + 2, params.end()); + if (!PreProcessOldProtocolMessage(who, params[1], newparams)) + return false; // Malformed. + + params.erase(params.begin() + 2, params.end()); + params.insert(params.end(), newparams.begin(), newparams.end()); + } if (irc::equals(cmd, "IJOIN")) { if (params.size() < 3) |
