on ^*:HOTLINK:*:#: {
; set a comma separated string of all nick prefixes to remove these chars in the
; hotlink evaluation (that is: hotlink will also trigger when hovering over pnicks)
var %nr = 1, %prefix
while ($mid($prefix,%nr,1)) { var %prefix = $addtok(%prefix,$v1,44) | inc %nr }
; if the mouse hovers over a nick or pnick (thus the prefix thing above),
; make it a hotlink that executes the clonescan for that nick
; you might change/remove that prefix thing,
; and/or add a custom remove string,
; e.g. all chars that cannot be part of a nick.
; some regsub for this removal would be nice, too :)
if ($remove($1, [ %prefix ,<,> ] ) ison $chan) { clonescanwindow $v1 $chan }
halt
}
; the clonescan-and-show alias
alias -l clonescanwindow {
; make window or switch name of window
var %w = $+(@clonecheck,$chr(160),$2)
$iif(($window($+(@clonecheck,$chr(160),*),1)),renwin $v1 %w,window -doCk0w0 +L %w -1 -1 280 55)
; clear window content
clear %w
; no clones
if ($ialchan($+(*!*@,$ial($1).host),$2,0) == 1) { aline 9 %w $chr(2) no clones $+ $chr(15) of $1 }
; clones
else {
var %c = $calc($v1 -1)
aline 4 %w $chr(2) %c $iif((%c == 1),clone,clones) $+ $chr(15) of $1
}
}
; menu definition to close the clonecheck-window
menu @clonecheck* {
close window "clonecheck" : window -c $active
}