| 1 |
! $Id: userhost,v 1.3 2002-02-19 19:43:28 f Exp $ |
| 2 |
! |
| 3 |
! Copyright (c) 1990-2001 Michael Sandrof, Troy Rollo, Matthew Green, |
| 4 |
! and other ircII contributors. |
| 5 |
! |
| 6 |
! All rights reserved. See the HELP SCROLLZ COPYRIGHT file for more |
| 7 |
! information. |
| 8 |
! |
| 9 |
Usage: USERHOST <nickname> [<nickname> .. ] [-cmd <command>] |
| 10 |
If only USERHOST nickname is supplied the server will be queried |
| 11 |
for information about that person. It will return something in |
| 12 |
the format: |
| 13 |
*** Daemon is [email protected] (Is an IRC operator) |
| 14 |
If -cmd command is added then it will parse the returned line |
| 15 |
just as though it were an ON or an ALIAS. |
| 16 |
Parameters are: |
| 17 |
$0 nickname |
| 18 |
$1 '+' if server operator, '-' otherwise |
| 19 |
$2 '+' if marked away, '-' if here |
| 20 |
$3 username |
| 21 |
$4 hostname |
| 22 |
|
| 23 |
Note: Something you may run into if you use this command within an |
| 24 |
ALIAS or ON is the following. Take the following example. |
| 25 |
alias bonk userhost $0 -cmd echo \($$*\) |
| 26 |
When bonk is called, $0 is expanded to a nickname, and $$* changes to |
| 27 |
$* to be used by userhost -cmd. However, since the entire expression |
| 28 |
is parsed twice, the \'s are eaten the first time leaving ($*) which |
| 29 |
will never expand. Thsu to make the above alias work, it has to be: |
| 30 |
alias bonk userhost $0 -cmd echo \\\($$*\\\) |
| 31 |
On the first pass it becomes userhost nick -cmd echo \($*\) |
| 32 |
and on the second pass when the -cmd part is executed it |
| 33 |
expands and executes echo (contents of $*) |
| 34 |
This is NOT a special case or a bug. It is just an added level of |
| 35 |
processing... |
| 36 |
|
| 37 |
See Also: |
| 38 |
expressions (under Special Cases at the end) |