; notice event: if a notice is received from a nick that has an associated notice
; window: add the notice to that window. (default beep/flash/strip/highlight settings)
on &^*:notice:*:?: {
if ($window($+(@notice.,$nick))) {
echo -bflrt $v1 $theme.notice($nick,$1-)
haltdef
}
}
; input event: send the input as notice to nick
on *:input:@notice.*:{
if ($left($1,1) != $readini($mircini,text,commandchar)) {
.notice $gettok($active,2,46) $1-
echo -t $target $theme.notice($me,$1-)
}
}
; alias for themed display in notice window
alias -l theme.notice {
return $+($chr(3),06<,$chr(3),02,$1,$chr(3),06>,$chr(15) $2-)
}
; nick change event: if theres an associated notice window for nick, change window name
on *:nick: {
if ($window($+(@notice.,$nick))) { renwin $v1 $+(@notice.,$newnick) }
}
; quit event: if theres an associated notice window for nick, display quit info there
on *:quit: {
if ($window($+(@notice.,$nick))) { echo -tlc info $v1 * $nick quits $network $+ : $1- }
}
; a nick with an associated notice window is no longer online: show "no such nick" error in that window
raw 401:*: {
if ($window($+(@notice.,$2))) {
echo -tlc info $v1 * $2-
haltdef
}
}
; nick popup: open/close notice window for nick
menu nicklist {
$iif(($window($+(@notice.,$$1))),Close,Open) Notice window with $$1 : {
window $iif(($window($+(@notice.,$$1))),-c,-eCk0z) $+(@notice.,$$1) -1 -1 350 150
}
}
; popup at notice window: close notice window
menu @notice.* {
Close this notice window : window -c $active
$iif(($window(@notice.*,0) > 1),Close all open notice windows $+([,$v1,])) : close -@ @notice.*
}