Note: The mainteinance of the scripting examples is discontinued since I no longer have an interest to continue doing so. The pages will remain here, for now, but that might not be the case in the future. You are free to download all the material on these pages and set a up mirror, or even continue the maintenance of the material by enhancing the examples yourself.

All the material in these examples are for the mIRC version 6.03. It is very likely that some or most of these examples won't work in future versions.

Scripting your own /who reply

RFC1459 specifies that a succesful Who query will be replied with numeric 352 that is of form "<channel> <user> <host> <server> <nick> <H|G>[*][@|+] :<hopcount> <real name>". By default mIRC hides the server. You can change this by doing your own handler for raw numeric 352.

The syntax for raw events is raw <numeric>:<matchstring>:<commands> The parameters are passed on $1-. $numeric has the event number, $1 has the recipient of the event (which is always your own nick) and $2- has the actual reply.

The parameters for raw 352 are:
$1 = your own nick
$2 = channel
$3 = ident
$4 = host
$5 = server
$6 = nick
$7 = <H|G>[*][@|+] where H stands for here, G for gone, * for IRCop, @ for channel op and + for voice
$8 = number of hops to the server (note that RFC specifies that hopcount should be prefixed with : but some servers leave it out)
$9- = real name

Example script

raw 352:*: {
  echo -s Who: $7 $2 $6 ( $+ $3 $+ @ $+ $4 $+ ) on $5 $8 * $9-
  halt
}

Sample output

Who: H@ #chat Foo (~bar@surfer.aol.com) on *.stealth.net :3 * Fred M.

With your own event you have full power over what you want to show and what colors you want to use.


Last updated 2003-04-05, Janne 'Geetee' Nikula, jn-mirc@zkelvin.net