'u' flag and bridge bot interface -- protocol info
Posted: 08 Feb 2019, 13:09
As announced in viewtopic.php?f=64&t=38922, uberserver now has support for bridge bots to external chat channels e.g. Discord, ZK, IRC. This allows chat messages to appear natively e.g. "<[Some]Dude:Discord> oh hai", and for a lobby to show the bridged users in their userlists.
With this comes a change: the chat for a battle now takes place inside a channel. This permits autohosts to also act as bridge bots e.g. "<[Some]Dude:DarkEnergy7> my tank just died", and also reduces duplicated code within the lobbyserver. Consequently SAYBATTLE and SAYBATTLEEX are deprecated.
A client signifies they are ready for both of these updates by sending the 'u' compatibility flag.
Protocol changes for ordinary clients who provide 'u':
Protocol changes for (auto)hosts who provide 'u':
Ordinary clients, including hosts, that fail to support 'u' are supported with (near complete) backwards compatibility using SAYBATTLE etc.
With this comes a change: the chat for a battle now takes place inside a channel. This permits autohosts to also act as bridge bots e.g. "<[Some]Dude:DarkEnergy7> my tank just died", and also reduces duplicated code within the lobbyserver. Consequently SAYBATTLE and SAYBATTLEEX are deprecated.
A client signifies they are ready for both of these updates by sending the 'u' compatibility flag.
Protocol changes for ordinary clients who provide 'u':
- A new sentence arg of BATTLEOPENED informs the client of the name of the channel associated to the battle. Clients joining (/leaving) this battle will be automatically joined (/left) from this channel, with the usual notifications sent to other clients supporting 'u'. The server controls which clients are present in this channel e.g. a 'normal' JOIN command is not allowed.
- The battle chat takes place through SAID and SAID** commands in this channel, just like a normal channel.
- JOINEDFROM, LEFTFROM, SAIDFROM to notify that a bridged user joined/left/spoke in a channel.
- CLIENTSFROM, sent alongisde the usual CLIENTS when a user joins a channel, providing a list of currently bridged users in that channel.
Protocol changes for (auto)hosts who provide 'u':
- Send a ex-style message within the battle to a single user with BATTLEHOSTMSG. This functions as a SAIDEX sent to just a single user, and is only accessible to battle hosts.
- BRIDGECLIENTFROM, UNBRIDGECLIENTFROMto notify the server of a user entering / leaving an external location.
- JOINFROM, LEFTFROM to join/leave a currently bridged user from a chat channel.
- SAIDFROM to make a bridged user within a chat channel to speak natively i.e. as <username@location>
Ordinary clients, including hosts, that fail to support 'u' are supported with (near complete) backwards compatibility using SAYBATTLE etc.