From fcb3090055429a108b9837dbd4ba505d9c291129 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 11 Mar 2026 21:54:40 +0000 Subject: Rework sending server protocol messages. - Replace CmdBuilder with MessageBuilder. This has a less footgun API. All message building has to go through this now so we can implement other message formats in the future. - Replace the message parsing in WriteLine with an analogue to PreProcessOldProtocolMessage. This should be much faster. - Move parameter translation from the core to spanningtree. - Change EncodeParameter to return the value instead of updating in place. - Replace the OnBuild*Message events with one OnServerMessage that can now access all parts of the message and change them. --- modules/spanningtree/remoteuser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/spanningtree/remoteuser.cpp') diff --git a/modules/spanningtree/remoteuser.cpp b/modules/spanningtree/remoteuser.cpp index a8db87f9f..8ccb2368f 100644 --- a/modules/spanningtree/remoteuser.cpp +++ b/modules/spanningtree/remoteuser.cpp @@ -29,7 +29,9 @@ SpanningTree::RemoteUser::RemoteUser(const std::string& uid, Server* srv) void SpanningTree::RemoteUser::WriteRemoteNotice(const std::string& text) { - CmdBuilder("NOTICE").push(uuid).push_last(text).Unicast(this); + MessageBuilder("NOTICE") + .Push(this->uuid, text) + .Unicast(this); } void SpanningTree::RemoteUser::WriteRemoteNumeric(const Numeric::Numeric& numeric) -- cgit v1.3.1-10-gc9f91