; menu switch
menu channel {
$iif(($group(#showchans) == on),$style(1)) Show chans on join...
.$iif(($group(#showchans) == on),stop,start) showing chans : $iif(($group(#showchans) == on),.disable,.enable) #showchans
}
#showchans on
; user joining
on !*:join:#: {
; if less than 8 joinwho variables set at all (little flood protect)
if ($var(%com.who.*,0) < 8) {
; set a temp variable for the user joining
set -eu10 $+(%,com.who.,$nick) $chan
; whois that nick
whois $nick
}
}
; server replies
raw *:*: {
; is a variable set for that nick?
if ($($+(%,com.who.,$2),2)) {
; the channel joinig has been the value of the variable...
var %chan = $v1
; whois reply "is on"
if ($numeric == 319) {
; remove the joining chan in the reply - output according to "other chans/no other chan"
if ($remtok($3-,$wildtok($3-,$+(*,%chan),1,32),1,32)) { echo -c info %chan ... $2 is also on: $v1 }
else { echo -c info %chan ... $2 is on no other (visible) chan. }
; halt that line
haltdef
}
; unset the variable on whois end
elseif ($numeric == 318) { unset $+(%,com.who.,$2) | haltdef }
; halt output of the other whois lines (thus the delay)
elseif (($int($calc($numeric / 100)) == 3) || ($numerkic == 401)) { haltdef }
}
}
#showchans end