Loading

Highlight script

  1. ; Highlight Script
  2. ; By Joshua
  3. ; Collects highlights, and sends the text, person who spoke that text, timestamp,
  4. ; network, and channel to a dedicated @highlights window.
  5.  
  6. alias hilight { highlight $1- }
  7. alias highlight {
  8.   if ($1 == addnick) {
  9.     $iif(!$ini(highlight.ini,$network,Nick),.writeini -n highlight.ini $network Nick $2,.writeini -n highlight.ini $network $addtok($readini(highlight.ini,n,$network,Nick),$2,44))
  10.     echo 14 -ga [HL] Added $2 to highlighted nicks.
  11.   }
  12.   elseif ($1 == delnick) {
  13.     .writeini -n highlight.ini $network $remtok($readini(highlight.ini,n,$network,Nick),$2,44)
  14.     echo 14 -ga [HL] Deleted $2 from highlighted nicks.
  15.   }
  16.   elseif ($1 == ignore) {
  17.     .writeini -n highlight.ini $network Ignore $addtok($readini(highlight.ini,n,$network,Ignore),$2,44)
  18.     echo 14 -ga [HL] Ignoring highlights from: $2 $+ .
  19.   }
  20.   elseif ($1 == unignore) {
  21.     .writeini -n highlight.ini $network Ignore $remtok($readini(highlight.ini,n,$network,Ignore),$2,44)
  22.     echo 14 -ga [HL] Unignoring highlights from: $2 $+ .
  23.   }
  24.   elseif (!$1) {
  25.     echo 14 -ga /highlight addnick nick
  26.     echo 14 -ga /highlight delnick nick
  27.     echo 14 -ga /highlight ignore nick
  28.     echo 14 -ga /highlight unignore nick
  29.   }
  30. }
  31. ;on *:text:*:#: {
  32. ;  if ($strip($me) isin $1-) && (!$istok($readini(connect.ini,n,$network,Ignore),$nick,44)) {
  33. ;    if (!$window(@highlights)) { window -xnhze @highlights }
  34. ;    aline -pa @highlights $adate $timestamp $+($chr(03),12,$chr(91),$chr(03),10,$network - $chan,$chr(03),12,$chr(93)) $+($chr(03),13,$nick,:) $+($chr(03),11,$1-)
  35. ;    ;    echo $chan $timestamp $+(<,$chr(03),$nick($chan,$nick).color,$nick($chan,$nick).pnick,$chr(03),>) $1-
  36. ;    haltdef
  37. ;  }
  38. ;}
  39.  
  40. on *:text:*:#: {
  41.   if (!$istok($readini(highlight.ini,n,$network,Ignore),$nick,44)) && ($strip($me) isin $1-)  {
  42.     if (!$window(@highlights)) { window -ntxze @highlights }
  43.     aline -pa @highlights $timestamp $+($chr(03),12,$chr(91),$chr(03),10,$network,/,$chan,$chr(03),12,$chr(93)) $+($chr(03),13,$nick,:) $+($chr(03),11,$1-)
  44.   }
  45. }

Comments