Table of Contents

# $EPIC: who.txt,v 1.3 2008/07/28 05:15:51 jnelson Exp $

Synopsis:

who [<option> …] [<target|pattern>]

Description:

The WHO command queries detailed information about a target or wildcard pattern. For each user it will return a single line containing their nickname, userhost address, realname (IRCNAME), their current channel (if it is public), whether they are a chanop or chanvoice there, whether they are here or gone, and whether they are an irc operator.

The WHO command uses the same rules as NAMES and LIST to determine which users will be returned. Invisible users will never be returned, and users on secret or private channels are never returned. Notwithstanding this, if you are on the same channel as someone else, they will be returned.

The client can do client-side filtering, to reduce the number of users shown.

Undernet and Dalnet each have (incompatible) server-side filtering.

Options:

Options may be abbreviated, so long as they are not ambiguous. If you specify any unrecognized options, the entire request is aborted.

   - Universal server-side filtering options:
  -oper     Show only irc operators
     Only one of the following options may be used in each request:
  -host <hostname>        Show only users from this host
  -server <servername>  Show only users on this server
  -name <username>  Show only users with this username
  -realname <username>  Show only users with this IRCNAME
  -nick <nickname>        Show only users with this nickname

   - Undernet-specific server-side filtering options:
   -u-i      Show invisible users (restricted to opers)
   -ux       Send an "Undernet Extended" who request
        (Cannot be used with any other options)

   - Dalnet-specific server-side filtering options:
   -dx     Send a "Dalnet Extended" who request
           (Cannot be used with any other options)

   - Client-side filtering options:
  -lusers                 Show only non-operators
  -chops                  Show only channel operators
  -nochops    Show only non-channel operators
  -here     Show only non-away users
  -away     Show only away users

    - Reply processing:
  -line {...}   Execute the code for each line and DO NOT
        hook /on WHO.
    The parameters to -line are exactly the same as the
    parameters to [[ON WHO]].

  -end {...}    Execute the code for the last line and DO 
        NOT hook /on 315.
    The parameters to -end are as follows:
      $0   name of server queried
      $1   body of the query

   - Debugging:
  -literal    Send a query exactly as specified to the 
        server with no client processing of the
        request.  (Cannot be used with other options)
  -flush      Flush the WHO queue (dangerous!)
  -diagnose   Display the WHO queue

Examples:

To list all irc operators on servers from foo.com:

    /who -o -s *.foo.com

To list the channel operators on channel #blah, which you are on:

    /who -c #blah

To list all users from Russia, saving it to a file:

    /who -h *.ru -f ru.users

To list all non-opers and say something at the end:

    /who -lusers -end { echo sheesh. that's a lot of lusers! }