'u' flag and bridge bot interface -- protocol info

'u' flag and bridge bot interface -- protocol info

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

Post Reply
User avatar
Posts: 3496
Joined: 25 Oct 2008, 00:23

'u' flag and bridge bot interface -- protocol info

Post by Silentwings » 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':
  • 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.
Protocol changes for bridge bots, only accessible with 'u': Clients supporting this functionality should send the 'u' compatibility flag. Bridge bots using the interface must send the flag, and also require a botflag. Ordinary clients, including hosts, that fail to support 'u' are supported with (near complete) backwards compatibility using SAYBATTLE etc.
0 x

Post Reply

Return to “Lobby Clients & Server”