Project

General

Profile

[Script] Highlights Window per Network v0.2

Added by Mr. BS over 2 years ago

This script captures all your highlights and displays in a custom window per network for easy lookup. It relies in AdiIRC user config. Then custom colors, timestamp/nick/message style, add words/phrases to be captured, ignore highlights from specific nicks/channels, everything is done in /options as usual.

Hey, Wait. AdiIRC already has a Highlights panel in View menu, why would user want an extra script for the same thing? Good question! I don't know, what matters is that someone wanted it. And personally, I liked more than the built in feature, specially for the colors support xD.

This is my first 100% multi-language script. If you are using a different AdiIRC lang than default English, it will uses the translated strings for the window title, text and menus.

Ps: in a channel to put focus on last highlight line use the shortcut ctrl + 1.

Screenshots

Script

; 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))
}

Replies (3)

RE: [Script] Highlights Window per Network v0.2 - Added by C. Syem 22 days ago

I love this. For years i was using a simple @Highlights window in my mIRC script but this is a next level :)))
But... is something wrong with alias "nick.formated" because the output is $user and not the nick who highlighted you.

RE: [Script] Highlights Window per Network v0.2 - Added by Per Amundsen 22 days ago

Change your Options -> Messages -> Prefix User to $nick or $pnick, $user is an old syntax from many years ago, probably came from a old theme.

RE: [Script] Highlights Window per Network v0.2 - Added by C. Syem 22 days ago

Yea, exactly. Came from mIRC theme. Thanks.

    (1-3/3)