Sorasyn commented on a Page, Simple Highlight  -  Nov 18, 2010

He means you can re-construct it to reduce redundancy. instead of:

on 1:TEXT:*:#:{
    if ($me isin $1-) {
      beep 5
      if (!@Highlight) {
        window -hw2 @Highlight
        aline -hp @Highlight $fulldate 4Text Highlight: 00 $+ $1- 10by 12 $+ $nick 10in 7 $+ $chan 10on 3 $+ $server $+ 9( $+ $network $+ )
      }
      else {
        aline -hp @Highlight $fulldate 4Text Highlight: 00 $+ $1- 10by 12 $+ $nick 10in 7 $+ $chan 10on 3 $+ $server $+ 9( $+ $network $+ )
    }
  }
}

It could be:

on 1:TEXT:*:#:{
    if ($me isin $1-) {
      beep 5
      if (!@Highlight) {
        window -hw2 @Highlight
      }
      aline -hp @Highlight $fulldate 4Text Highlight: 00 $+ $1- 10by 12 $+ $nick 10in 7 $+ $chan 10on 3 $+ $server $+ 9( $+ $network $+ )
  }
}

So it evaluates as if the window isn't present then it creates one AND writes the highlight into the window, OR it just writes to the specified window. Also if it piques your curiosity you could script in multi-server support. A highlight window for each server instead of sifting through one large window.

No worries I got grilled on the same thing when I posted a similar snippet. Suggestions helped me a lot.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.