libspades
Ace of Spades library
PacketVersionResponse Struct Reference

Informs the server about the details of the client. More...

#include <protocol.h>

Data Fields

uint8_t packetID
 34 (Client-->Server)
 
char client
 A single byte used to identify the client.
 
uint8_t versionMajor
 The major version of the client.
 
uint8_t versionMinor
 The minor version of the client.
 
uint8_t versionRevision
 The revision of the client.
 
char operatingSystemInfo [VARIABLE_LENGTH]
 A string intended to contain the operating system the client is running on.
 

Detailed Description

Informs the server about the details of the client.

The standard format for the /client command: "(You are|PLAYER is) connected with CLIENT 4.16.128 on OPERATING SYSTEM", where PLAYER is the player name, CLIENT is the string associated with the client char, 4.16.256 is replaced with versionMajor.versionMinor.versionRevision and OPERATING SYSTEM is replaced with operatingSystemInfo

Piqueserver bug
This packet can be sent at any time (even long after a Version Request) and any quantity of times.

Field Documentation

◆ client

char PacketVersionResponse::client

A single byte used to identify the client.

It is unknown why this is a single byte and not a string like operatingSystemInfo. Commonly recognized values:

  • 'o': "OpenSpades",
  • 'B': "BetterSpades",
  • 'a': "ACE" (not present in SpadesX)
  • default: "Unknown(C)" where C is the character of this parameter

◆ operatingSystemInfo

char PacketVersionResponse::operatingSystemInfo[VARIABLE_LENGTH]

A string intended to contain the operating system the client is running on.

Variable length.

Note
It does not actually need to contain the operating system, and can contain things like the client's name (because for some reason that is just a single char) or what method the client was acquired (like AppImage, from source, pre-compiled binary) for example.
SpadesX may refuse to accept this parameter if it is greater than or equal to 256 bytes in length and result in the parameter being replaced with "Unknown". Do also note that setting the last byte to a null byte is not necessary, as SpadesX automatically does that when the packet is read.
Piqueserver bug
Sending an extremely large size for this parameter (there is a limit somewhere below 32 MiB) will cause the server to temporarily freeze, disconnecting every player connected. Tested with 16777216 bytes of data.

The documentation for this struct was generated from the following file: