Project

General

Profile

[Script] Highlights Window per Network v0.2 » Highlights Window per Network v0.2.ini

Mr. BS, 02/11/2015 11:32 PM

 
; http://dev.adiirc.com/boards/5/topics/268
; Highlights Window per Network
; v0.2 by pereba

on *:START: { get.conf }
on *:UNLOAD: { if ($hget(hlw)) hfree hlw }
on *:OPTIONS: { get.conf }

;ctrl + 1 shortcut
on *:KEYUP:#:49: {
if ($hget(hlw,last.highlight. $+ #) && $mouse.key & 2) { findtext $v1 }
}

on *:TEXT:$($m($1-)):#,?:{
if ($istok($hget(hlw,ignores),$nick,166)) { return }
hadd -m hlw last.highlight. $+ $chan $strip($timestamp $nick.formated $1-)
var %w $+(@,$adilang(Highlights),$chr(160),$network)
if (!$window(%w) {
window -vnkq1 %w
echo -c highlight %w $+($cs(Highlights),$sp,$chr(32),$sp,$cs($network))
es %w
echo %w $+($cs2(Window),$sp,$chr(32),$sp,$cs2(Message))
es %w
}
var %h $iif($highlight($1-) == $!me, $eval($v1,2), $v1)
echo $highlight($1-).color -m %w $target $+ $sp $sp $+ $timestamp $nick.formated $&
$replacex($1-, %h, $+($chr(2),%h,$chr(2)))
es %w
}

alias -l get.conf { hadd -m hlw nick.conf $readini(config.ini,n,Messages,prefixuser) | $&
hadd -m hlw ignores $readini(config.ini,n,Highlight,HighlightExclude) }
alias -l m return * $+ $iif($$highlight($iif($1- !isnum,$v1)) == $ $+ me, $me, $v1) $+ *
alias -l es echo $1 $chr(160)
alias -l sp return $str($chr(160),4)
alias -l cs return $+($chr(2),$chr(31),$1-,$chr(2),$chr(31))
alias -l cs2 return $+($chr(31),$adilang($1),$chr(31))
alias nick.formated {
var %nick $iif($randomcolors & 1, $+($chr(3),$nick(#,$nick).color,$nick,$chr(3)), $nick)
return $replace($hget(hlw,nick.conf), $!pnick, $left($nick(#,$nick,a,r).pnick,1) $+ %nick, $&
$!status, $left($nick(#,$nick,a,r).pnick,1), $!nick, %nick)
}
alias hl.menu {
var %m $adilang(Clear) :dline $active 5- $+ $line($active,0) , -, $adilang(Search) :search, $&
-, $adilang(Highlights) $adilang(Options) :options -t highlights, -, $adilang(Close) :window -c $active
if ($istok(begin end,$1,32)) return -
else return $gettok($($+(%,m),2),$1,44)
}

menu @* {
if ($+(@,$adilang(Highlights),$chr(160),$network) == $active) $submenu($hl.menu($1))
}
(4-4/5)