Use the command below to set a variable to a comma separated list of channels you want to use for /whois on join.
;/set %whoisjoin #Channel1,#channel2,#channel3,etc...
after you have your channels set, you would use the following code to set the display channel and /whois the user on join...
on *:join:%whoisjoin: {
if ((!%whojchan. [ $+ [ $nick ] ]) && ($nick != $me)) {
set %whojchan. [ $+ [ $nick ] ] $chan
whois $nick $nick
}
}
And these raw reply codes are what allows it to display in the proper channel.
raw 311:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 $2-
haltdef
}
}
raw 319:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 Channels: $3-
haltdef
}
}
raw 312:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 Server: $3 / $4-
haltdef
}
}
raw 307:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 $2-
haltdef
}
}
raw 301:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 $2 is away $3-
haltdef
}
}
raw 313:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 Status: $3-
haltdef
}
}
raw 310:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 $2-
haltdef
}
}
raw 317:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 Idle: $duration($3) / Signon: $asctime($4)
haltdef
}
}
;--318 End of /WHOIS
;--end of whois reply, here we need to unset the '%whojchan. [ $+ [ $2 ] ]' variable,
;---or it will not be able to be used the next time this user joins.
raw 318:*: {
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 $3-
unset %whojchan. [ $+ [ $2 ] ]
haltdef
}
}
Please Note:1) If the user joins several of the channels you have in the list at the same time, it will only display for the first channel the user joined..
2) The raw reply codes above are only a few of the ones that could be returned from a /whois request. you will need to search online for them or you can use the
/debug @Debug command to see what the server returns.
3) To add more raw replys to the list, you will need the relevant part of the raw reply code, which is as follows:
if (%whojchan. [ $+ [ $2 ] ]) {
echo $v1 <formatted raw reply here>
haltdef
}
$v1 returns the value of the 'if match', in this case it's the channel name that was stored in
%whojchan. [ $+ [ $2 ] ].
In a whois reply '$2' is always the nick name of the user you did the /whois on.
I do hope all that makes sense enough to be useable, good luck and happy scripting. =)
- Tw|tch