[DONE] WHOX support

These are old archives. They are kept for historic purposes only.

Moderators: Gottem, Supporters

Post Reply
Skizzerz
Posts: 16
Joined: Thu Dec 25, 2008 1:39 am

[DONE] WHOX support

Post by Skizzerz »

This module adds WHOX support to UnrealIRCd 4. Tested on 4.0.17.

WHOX is an extension of the /WHO command to allow for customization of output fields. By specifying the fields in the command, only those fields will be shown. In addition to fields available to base /WHO, some additional fields are available, for example local idle time or logged-in account name. These fields are fully compatible with the existing flags in /WHO to perform filtering and adjust behavior.

When loaded, support for WHOX is advertised in the ISUPPORT reply via the "WHOX" token. To maintain interoperability with how this feature works in other IRCds, it additionally supports placing the flags/fields after the mask in addition to before. When any fields are defined, the /WHO reply is sent via numeric 354 (RPL_WHOSPCRPL) rather than 352 (RPL_WHOREPLY). If no fields are defined, it falls back to the /WHO you are already familiar with.

Basic usage: /WHO [+|-][acghimnsuMRI][%tcuihsnfdlar[,querytype]] [args]

For a description of the flags before the %, consult the built-in documentation for the WHO command. The behavior of these flags is unchanged in this module. To perform an extended WHO query, add a % followed by one or more fields. The querytype is only needed (and only used) if specifying the 't' field, and must be a number.
  • t: outputs the number in querytype in the reply
  • c: channel
  • u: username
  • i: IP address (255.255.255.255 if the IP is unknown, for example if the target is usermode +x and you are not an oper)
  • h: host (virtual host by default, but the +R behavior flag makes it the realhost, and the +I behavior flag makes it the IP)
  • s: server
  • n: nickname
  • f: status flags
  • d: hop count
  • l: idle time in seconds (0 for users on other servers)
  • a: services account name (0 if none)
  • r: realname
Code is available here.
Post Reply