The documentation below assumes a working understanding of the Hotline protocol:
GIF Icon Extension
Colored Nicknames
#define HTLC_HDR_ICON_GETLIST 0x00000745 #define HTLC_HDR_ICON_SET 0x00000746 #define HTLC_HDR_ICON_GET 0x00000747 #define HTLS_HDR_ICON_CHANGE 0x00000748 #define HTLC_DATA_ICON_GIF 0x0300 #define HTLS_DATA_ICON_GIF 0x0300 #define HTLS_DATA_ICON_LIST 0x0301
The client is responsible for requesting GIF icons from the server. The server broadcasts an HTLS_HDR_ICON_CHANGE packet to let the clients know someone's GIF icon changed and that they should re-request it. Thus, the server never sends an unrequested GIF icon over the network, preventing abuse. A maximum file size can also be imposed.
Transaction Details
HTLC_HDR_ICON_GETLIST
Requests a full list of GIF icons (one HTLS_DATA_ICON_LIST object for each user) from the server.
See the HTLS_DATA_ICON_LIST description below.
HTLC_HDR_ICON_SET
Sets the GIF icon for the client. needs only a HTLC_DATA_ICON_GIF object containing the raw GIF data.
A task complete packet is sent back.
HTLC_HDR_ICON_GET
Requests the GIF icon for a specified client (specified as usual by a HTLC_DATA_SOCKET object).
The GIF data is sent back in a task packet with an HTLS_DATA_ICON_GIF object. The packet should
also include the UID of the client whose GIF it is sending in an HTLS_DATA_SOCKET object.
HTLS_HDR_ICON_CHANGE
Sent to the whole userlist when a client sets their GIF icon. Contains the UID of the client in
an HTLS_DATA_SOCKET object.
HTLS_DATA_ICON_LIST
An object containing the UID of a client and their associated GIF data. The format of this object is as follows:
<16-bit unsigned UID> <16-bit unsigned GIF length> <GIF data>
#define HTLC_DATA_COLOR 0x0500 #define HTLS_DATA_COLOR 0x0500
The DATA_COLOR object is an unsigned 32-bit integer representing an RGB value for nickname color. The R, G, and B are stored as follows:
u_int8_t red = (color & 0x00FF0000) >> 16; /* red stored in bits 16-23 */ u_int8_t green = (color & 0x0000FF00) >> 8; /* green stored in bits 8-15 */ u_int8_t blue = (color & 0x000000FF); /* blue stored in bits 0-7 */The last 8 bits are not currently used, but could be used in the future for more advanced options, such as alpha. Remember to convert the 32-bit integer to host byte order before extracting the color values.
Transaction Details