Modifying Your Whois Display

Written by Kintar0

This is a common scripting question, "How can I change how whois is displayed?" First of all, there is no such thing as ON WHOIS so thats not where we start. We'll get into RAW's here. This article is not meant for beginners so please check out mIRC's help file before reading on here. Let's Begin!

The order is listed as how it would normally be displayed.

raw 311:*: {
   echo -s $2 is $3 $+ @ $+ $4 $6
   haltdef
}

Raw 311 returns the nick's username, ident, host, and real name. $2 represents the nick. $1 would return YOUR nick as any other raw does. $3 returns the username, $4 is the host, and $6 is the real name. You may add control codes(color, bold...etc) as you wish.

raw 319:*: {
   echo -s Channels: $3-
   haltdef
}

Raw 319 returns what channel the user is on. We start at parameter 3 ($3) because $1 is YOUR nick(as always) and $2 returns "on". $3 is the first channel the user is on, $4 would be the second channel..and so on. We use $3- so that we don't need to use $3 $4 $5 and so on. The "-" in "$3-" simply tells mIRC to return the third parameter and everything after.

raw 312:*: {
   echo -s Server: $3 (Server info: $4- $+ )
   haltdef
}

Raw 312 returns the users server info. It will tell you what server the user is on and the server's info line. Again we start with $3 because $2 returns "using" and we have no use for that word in that line. $3 is the server name and $4- is all of its info.

raw 307:*: {
   echo -s [[ $+ $2 $+ ]] is identified.
   haltdef
}

Raw 307 is only used for Networks with Nickname Services. It tells you that nickname is registered. $2 is the user's nickname, and $3 and $4 return "nickname is" just like we have it. $5 returns "registered" so you can spice this one up but there's not much you can work with.

raw 313:*: {
   echo -s $2 - $3 - $4 - $5 - $6
   haltdef
}

Raw 313 tells you if the user is an IRCop. $2 returns the user's nick, $3 and $4 returns "is a", then $5 and $6 returns "IRC Operator". This will only show if the user is an IRCop.

raw 301:*: {
   echo -s Away, reason: ( $+ $3- $+ )
   haltdef
}

Raw 301 returns away info. If the user is away, this raw will be triggered. $3 is the first word/parameter of the reason the user is away. Everything after that is either null or else it is displayed.

raw 317:*: {
   echo -s Idle time: $duration($3) and signed on $asctime($4)
   haltdef
}

Raw 317 returns idle time. If you use just $3, you'll get some strange numbers you probably can't figure out. So we use $duration which will convert it into time we can tell (weeks, days, hours, minutes, seconds). $4 skips to the time you signed on. Again it returns strange numbers which you wont be able to interpret on your own. $asctime returns it in Time and Date format. Everything in between $3 and $4 in the script will need to be added by you to make any sense. You'll have something that looks like "3secs Tue Jan 25 18:14:04 2000". Instead, you want something like "Idle time: 0secs and signed on Tue Jan 5 18:14:04 2000".

raw 318:*: {
   echo -s End of $2 $+ 's /whois
   haltdef
}

Raw 318 just lets you know that the information is complete and is displayed at the end of everything. You could probably say anything here. Such as "Whois Complete" or "/Whois Finished!"..etc


2000 ClanX Scripterz Organization