Skip to content

Instantly share code, notes, and snippets.

@Elizafox
Last active December 29, 2015 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elizafox/7742992 to your computer and use it in GitHub Desktop.
Save Elizafox/7742992 to your computer and use it in GitHub Desktop.
xinfo

XINFO Specification

Copyright (c) 2013 Elizabeth Myers elizabeth@interlinked.me.

Unlimited redistribution and modification is allowed provided that the above copyright notice and this permission notice remains intact.

Introduction

Stats numerics are a total, unsolvable disaster in IRC. Some of the largest conflicts in the numerics list are in the stats numerics. In addition, they all do different things and have slightly different formats. This proposal will replace stats numerics with a key : value pair.

XINFO command

The XINFO command issued by clients shall be framed as follows:

XINFO <verb> [<server>]

Upon issuing this command, servers shall return an RPL_XINFOTYPE describing the format followed by one or more LINES formatted in accordance with the RPL_XINFOENTRY format described in the Numerics table.

The interpretation of a given key and value pair is dependent on the XINFO subcommand.

Basic types

An RPL_XINFOTYPE command is a format specifier that describes to the client how to display the information given. For security reasons, C formatting specifiers are not used, and instead the following are specified:

Type Description
string ASCII text string
int Integer
float Floating-point number (clients may round this)
timestamp A Unix/ISO timestamp (TBD which)
server A server name
nick A nickname
bytes Number of bytes

The string, int, and float types are left to client interpretation for handling and should not be construed as having any meaning to clients (being text for human reading only).

Adoption

Upon adopting and implementing this proposal, server authors should remove stats support, and translate the appropriate STATS command to an XINFO command.

Numerics

The numerics 772 through 775 must be reserved for XINFO, carrying the following labels and formats:

No. Label Format
772 ERR_NOSUCHXINFO :<server> 772 <nick> <topic> :No such XINFO topic available
773 RPL_XINFOENTRY :<server> 773 <nick> <key> <value> [[<key> <value>] ...]
774 RPL_XINFOEND :<server> 774 <nick> :End of XINFO request
775 RPL_XINFOTYPE :<server> 775 <nick> <key> <type> [[<key> <type>] ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment