From 9327333813cbcb538f6757934be42d59c34f86d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 20 Sep 2022 17:14:55 +0200 Subject: xC/xP: show own user's info in frontends --- xC-proto | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'xC-proto') diff --git a/xC-proto b/xC-proto index 03c40d7..ea39b86 100644 --- a/xC-proto +++ b/xC-proto @@ -155,13 +155,25 @@ struct EventMessage { case SERVER_UPDATE: string server_name; - enum ServerState { + union ServerData switch (enum ServerState { DISCONNECTED, CONNECTING, CONNECTED, REGISTERED, DISCONNECTING, - } state; + } state) { + case DISCONNECTED: + case CONNECTING: + case CONNECTED: + void; + case REGISTERED: + string user; + string user_mode; + // Theoretically, we could also send user information in this state, + // but we'd have to duplicate both fields. + case DISCONNECTING: + void; + } data; case SERVER_RENAME: // Buffers aren't sent updates for in this circumstance, // as that wouldn't be sufficiently atomic anyway. -- cgit v1.2.3