There are various different /who flags (Flags are like modes you specifiy to make the command behave differently).
Here are the ones I am aware of:
Flag a: user is away.
Flag c #channel: user is on <channel>.
Flag h <host>: user has string <host> in their hostname.
Flag m <usermodes>: user has <usermodes> set on them.
Flag n <nick>: user has string <nick> in their nickname.
Flag s <server>: user is on server <server>.
Flag u <user>: user has string <user> in their username.
Flag C: show first visible channel user is in.
Flag M: check for user in channels you are in.
The above modes are case sensitive (So flag 'a' is not the same as flag 'A').Examples
i) /who +Mh *hostname/ip here*
- This would search for a hostname (or part of a hostname) in all the channels you're currently in. So /who +Mh *aol.com* would search for all AOL users in the channel you're
ii) /who +m w
- This would search ALL users on the entire network to see if they had usermode +w (which means they can see WALLOPS, a type of IRCOp message)Please note
: Some networks may have added other who modes and disabled some of the ones listed above. It might be best to check with the networks main help channel, possibly #Help - check their website.
As for scripting, that's not really an answerable question. A command can be used in about 10,000,000 ways when it comes to scripting, especially one as diverse as /who so it's fairly impossible to list them all. Then again, perhaps I misunderstood you
That said, scripting questions and the like are probably best asked in the Scripts & Popups
section of the message boards.