aboutsummaryrefslogtreecommitdiff
path: root/modules/spanningtree/uid.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-11 21:54:40 +0000
committerGravatar Sadie Powell2026-03-12 00:18:06 +0000
commitfcb3090055429a108b9837dbd4ba505d9c291129 (patch)
tree5c55fd77d3b24adeda54e250d91b2a44badc9c5d /modules/spanningtree/uid.cpp
parentMark all acting extbans as MATCH_REQUIRE_CHANNEL. (diff)
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.
Diffstat (limited to 'modules/spanningtree/uid.cpp')
-rw-r--r--modules/spanningtree/uid.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/spanningtree/uid.cpp b/modules/spanningtree/uid.cpp
index 333a63caf..c507ad959 100644
--- a/modules/spanningtree/uid.cpp
+++ b/modules/spanningtree/uid.cpp
@@ -177,17 +177,17 @@ CmdResult CommandFName::HandleRemote(RemoteUser* src, Params& params)
}
CommandUID::Builder::Builder(User* user)
- : CmdBuilder(TreeServer::Get(user), "UID")
+ : MessageBuilder(TreeServer::Get(user), "UID")
{
- push(user->uuid);
- push_int(user->nickchanged);
- push(user->nick);
- push(user->GetRealHost());
- push(user->GetDisplayedHost());
- push(user->GetRealUser());
- push(user->GetDisplayedUser());
- push(user->GetAddress());
- push_int(user->signon);
- push(user->GetModeLetters(true));
- push_last(user->GetRealName());
+ Push(user->uuid);
+ Push(user->nickchanged);
+ Push(user->nick);
+ Push(user->GetRealHost());
+ Push(user->GetDisplayedHost());
+ Push(user->GetRealUser());
+ Push(user->GetDisplayedUser());
+ Push(user->GetAddress());
+ Push(user->signon);
+ Push(user->GetModeLetters(true));
+ Push(user->GetRealName());
}