-
Notifications
You must be signed in to change notification settings - Fork 2
Doku
The sent messages contain a json string (apart from ping/pong messages). The structure of the messages is
[
"type_of_message",
{ "some": "data" }
]Where the first entry of the array is the type of message being sent and the second entry contains the payload.
The types of messages a user can send to the server and their payloads are:
{
"maps": ["de_dust2"]
}Which maps does one want to play?
{
"maps": ["de_dust2"]
}Which maps does one not want to play?
Discard votes done beforehand.
Discard vetos done beforehand.
No payload required. Only the admin (the first participant) can use this. A message containing all votes will be broadcasted to everyone.
No payload required. Only the admin (the first participant) can use this. All votes will be reset.
{
"name": "Fancy Nickname"
}Modify the name displayed to all participants.
{
"items": [
{
"votesPerParticipant": 2,
"vetosPerParticipant": 3
}
]
}Change how many votes and vetos each participant can submit. Only the lobby admin can use this message.
The types of messages the server will send to the participants and their payloads are:
No payload. The client should update the view do enable voting again.
{
"items": [
{
"name": 1,
"voted": true,
"vetoed": false
}
]
}This message is broadcasted to everyone, every time someone joins or leaves or submits a vote or a veto.
{
"items": [
{
"name": 1,
"votes": ["de_dust2"],
"vetos": ["de_anubis"]
}
]
}This message is broadcasted after the admin sent the show_result message.
{
"votesPerParticipant": 3,
"vetosPerParticiant": 2
}This message is broadcasted after the admin sent a slider message.