rendered paste bodyon *:JOIN:#rspc:{
if ($me ison #rspc-staff) {
.enable #pcwhois
whois $nick
}
}
alias c1 { return $+(,%color1,$1-,) }
alias c2 { return $+(,%color2,$1-,) }
alias c3 { return $+(,%color3,$1-,) }
#pcwhois off
raw *:*:{
if ($istok(301|307|310|311|312|313|314|317|318|319|320|330|335|338|369|378|379|401|406|671,$numeric,124)) haltdef
if ($numeric == 319) {
var %a $numtok($3-,32)
var %b 1
while (%b <= %a) {
var %chan $gettok($3-, $+ %b $+ ,32)
if (pc isin %chan || pest isin %chan) && (!$istok(#rspc #thepc #rspc-staff #thepc.games #thepc.staff #thepc.chat #pcchans,$iif($left(%chan,1) == $chr(35),%chan,$right(%chan,-1)),32)) {
var %chans = %chans $c3(%chan)
}
else {
var %chans = %chans $c1(%chan)
}
inc %b
}
msg #rspc-staff $c2($2 $+($chr(40),$gettok($address($2,5),2,33),$chr(41)) is on:) %chans
}
elseif ($numeric == 318) {
.disable #pcwhois
}
}
#pcwhois end