pub struct Login {
pub protocol: u8,
pub name: BString,
pub session: BString,
pub horizon_x: u16,
pub horizon_y: u16,
pub flag: BString,
}Expand description
Initial packet sent to log in to the server.
This sent to the server when the player first joins.
Fields§
§protocol: u8The current protocol version. Should always be 5 as of the writing of this documentation.
name: BStringThe name that the player wishes to be called on the server. The actual
name of the player given by the server will be in the
Login packet returned by the server.
session: BStringA session token for the current player. This session token is the way that
a player would log in to the server. If the player does not wish to be
logged on to the server then a session token of "none" will suffice.
horizon_x: u16Should set the size of the horizon beyond which game updates (missile updates and player updates) are not sent to the client. In practice, this doesn’t appear to be used by the official server.
horizon_y: u16Same as horizon_x but in the y direction.
flag: BStringThe desired flag of the player. This should be the ISO-2 country code corresponding to the flag that the player wishes to take. It may also be one of the special flag codes for non-country flags.
If the flag code passed in is not one of the ones for which there is a known (to the server) flag, then the player will be assigned to UN flag (in the official server).