aboutsummaryrefslogtreecommitdiff
path: root/xC-proto
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-20 17:14:55 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-20 17:24:30 +0200
commit9327333813cbcb538f6757934be42d59c34f86d6 (patch)
tree9c4d39be99205279ba5dbd8bf488405378326f16 /xC-proto
parent7806d4bd4eba73fd423c7d966a0ee286cde37b37 (diff)
downloadxK-9327333813cbcb538f6757934be42d59c34f86d6.tar.gz
xK-9327333813cbcb538f6757934be42d59c34f86d6.tar.xz
xK-9327333813cbcb538f6757934be42d59c34f86d6.zip
xC/xP: show own user's info in frontends
Diffstat (limited to 'xC-proto')
-rw-r--r--xC-proto16
1 files changed, 14 insertions, 2 deletions
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.