menu channel {
-
$iif(($group(#mousepointerclones) == on),$style(1)) Mousepointer Clonescan...
.$iif(($group(#mousepointerclones) == on),$style(1)) enable : .enable #mousepointerclones
.$iif(($group(#mousepointerclones) == off),$style(1)) disable : .disable #mousepointerclones
}
#mousepointerclones off
on ^*:hotlink:*:#: {
; cycle possible nick prefixes to allow hotlink on pnicks
var %nr = 1, %prefix
while ($mid($prefix,%nr,1)) { var %prefix = $addtok(%prefix,$v1,44) | inc %nr }
if ($remove($1, [ %prefix ,<,> ] ) ison $chan) {
var %nick = $v1
; if no clone hotlink for that nick active
if ((!$($+(%,clonetip.queued.,%nick),2)) && (!$tip($+(clonetip.,%nick)))) {
set -u5 $+(%,clonetip.queued.,%nick) 1
var %host = $+(*!*@,$ial(%nick).host)
; if clones of that user present
if ($ialchan(%host,$chan,0) > 1 ) {
var %c.num = $calc($v1 -1), %nr = 1, %clones
; make a list of all clones
while ($ialchan(%host,$chan,%nr).nick) {
if ($v1 != %nick) { var %clones = $addtok(%clones,$+(•,$chr(160),$v1),32) }
inc %nr
}
; set tip layout
var %title = Clones found on $chan
var %line1 = $+($chr(2),%nick,$chr(2),:) %c.num $iif((%c.num == 1),Clone,Clones) $crlf
var %line2 = %host $crlf $+ $chr(160) $crlf
var %linex = $replace(%clones,$chr(32),$crlf) $crlf $+ $chr(160)
; show tip
noop $tip($+(clonetip.,%nick),%title,%line1 $+ %line2 $+ %linex,3,$null,$null,$null,$activewid)
}
}
}
halt
}
#mousepointerclones end