Hilightcatcher v1.1

By knoeki on Oct 09, 2009

Just a simple hilightcatcher I wrote for some people on #zomgwtfbbq ;_) might be useful to more people, I guess.

Usage:

/hilights on - enables hilightcatching, will send a copy of every message containing your nick to a custom window.
/hilights off - disables hilightcatching.

May you accidentally close the window while the hilightcatcher is on, don't worry, it'll pop up again next time you're hilighted, unless you disable it first ;_)

I'd say it's pretty foolproof, but obviously mother nature will now feel challanged to create a better fool ;_)

alias hilights {
    if ($1 == on) {
        set %k.hilight.catcher 1
        window -nak0 @hilights
        echo -a HilightCatcher enabled.
    }
    else {
        unset %k.hilight.catcher
        window -c @hilights
        echo -a HilightCatcher disabled.
    }
}

on *:TEXT:*:#: {
    if (%k.hilight.catcher == 1) {
        if ($window(@hilights) == $null) {
            window -nak0 @hilights
        }
        if ($me isin $1-) {
            window -g2 @hilights
            echo @hilights $+($([),$asctime(HH:nn:ss),$(][),$asctime(dd/mm/yyyy),$(])) :: $network / $chan $+(<,$nick($chan, $nick).pnick,>) $replace($1-, $me, $+(04,$me,))
        }
    }
}

on *:ACTION:*:#: {
    if (%k.hilight.catcher == 1) {
        if ($window(@hilights) == $null) {
            window -nak0 @hilights
        }
        if ($me isin $1-) {
            window -g2 @hilights
            echo @hilights $+($chr(91),$asctime(HH:nn:ss),$(][),$asctime(dd/mm/yyyy),$(])) :: $network / $chan * $nick($chan, $nick).pnick $replace($1-, $me, $+(04,$me,))
        }
    }
}

on *:START: {
    window -nak0 @hilights
}

on *:OPEN:@hilights: {
    echo @hilights Hilightcatcher v1.1 by Knoeki.
    echo @hilights For help, contact me at irc.p2p-network.net / #zomgwtfbbq
}

Comments

Sign in to comment.
knoeki   -  Oct 10, 2009

hrm.. strange how I overlooked that, because I could swear it works :x oh well

 Respond  
gooshie   -  Oct 10, 2009

Forgot to mention:
/help on open
==> The OPEN event does not trigger for custom windows.

 Respond  
knoeki   -  Oct 10, 2009

gooshie: yeah, that works, but in my eyes it looks horrible. The nice thing about coding though, is that everyone can have his/her own style. :_)

 Respond  
gooshie   -  Oct 09, 2009
alias hilights {
  if ($1 == on) {
    inc %k.hilight.catcher
    window -nak0 @hilights
    echo -a HilightCatcher enabled.
  }
  else {
    unset %k.hilight.catcher
    window -c @hilights
    echo -a HilightCatcher disabled.
  }
}
on *:TEXT:$($+(*,$me,*)):#:hilight.catcher t $1-
on *:ACTION:$($+(*,$me,*)):#:hilight.catcher a $1-
alias hilight.catcher {
  if %k.hilight.catcher {
    if !$window(@hilights) { window -nak0 @hilights }
    window -g2 @hilights
    echo @hilights $+($([),$time,][,$adate,]) :: $network / # $+($iif($1 = a,* $+ $chr(32),<),$nick(#,$nick).pnick,$iif($1 != a,>)) $replace($2-,$me,$+(04,$me,))
  }
}
on *:START:window -nak0 @hilights
 Respond  
DrtyDawg   -  Oct 09, 2009

Great stuff, simple idea - but very handy
Thx knoeki :)

 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.