WHO <mask> [<flags>][%[<fields>[,<querytype>]]]

The WHO command retrieves information about users matching the specified
mask. If no mask is provided, it defaults to listing all users. Options
allow filtering and customizing the output fields.

Flags:
  These specify which fields to match against the mask:
    a - Account name
    h - Hostname
    i - IP address (supports CIDR notation)
    n - Nickname
    o - Includes only users with IRC operator status
    r - Real name (GECOS)
    s - Server name
    u - Username
  Usage: WHO <mask> nuhsr

Fields:
  These specify which fields to include in the output:
    a - Account name (shows "0" if no account)
    c - Channel name
    d - Distance (hop count)
    f - Flags (away, oper, chanop, etc.)
      Flags in the output may include:
        G - User is away
        H - User is here
        B - User is a bot
        z - User is using a secure connection
        r - User is registered
        * - User is an IRC operator
      Channel prefixes:
        ~ - Channel owner
        & - Channel admin
        @ - Channel operator
        % - Half-operator
        + - Voiced user
    h - Hostname
    i - IP address
    l - Idle time (0 for remote users)
    n - Nickname
    o - Oper level
    r - Real name (GECOS)
    s - Server name
    t - Query token
    u - Username (with eventual ~)
  Usage: WHO <mask> %[cfhilnorst]

Query type:
  Specifies a numeric query type token (up to three digits) for custom
  scripts. This token is included in the output to help identify and
  filter results.
  Usage: WHO <mask> %[nhirs],123

Defaults:
  If no mask is provided, the command lists all users.
  Default matching fields: nuhsr
  Default output fields if no %[fields] option is specified: nuhs

Examples:
  WHO #channel
    Lists all users in the specified channel.

  WHO nick
    Lists information about the user with the specified nickname.

  WHO * o
    Lists all IRC operators.

  WHO 192.168.1.0/24 i%hilnorst,101
    Lists users whose IP address matches the CIDR mask 192.168.1.0/24,
    includes the following fields in the output:
      - Hostname
      - IP address
      - Idle time
      - Real name (GECOS)
      - Server name
    The output includes the query token 101 to help identify and filter
    these results.
