Just another highlighter

By MichaelA on Sep 23, 2011

Er dunno what to say really, it's just another highlighting script. Yours if you want to use it. Might have a few small problems, willing to fix if requested. We all know how they work, someone says your name, it flashes, makes a cute sign, then logs it into a window.

ON $*:TEXT:/\b/Sgi:#:{
  if ($istok($strip($1-),$me,32)) || ($istok($strip($1-),$me $+ 's,32)) || ($istok($strip($1-),$me,44)) || ($istok($strip($1-),$me $+ 's,44)) || ($istok($strip($1-),$me,46)) || ($istok($strip($1-),$me $+ 's,46)) {
    set -u30 %highlighter.chan $chan | set -u30 %highlighter.msg $1- | set -u30 %highlighter.nick $nick | set -u30 %highlighter.network $network
    if ($appactive) { if ($away) { if (%hinick. [ $+ [ $nick ] ] != 1) { .notice $nick Away message: $awaymsg (Automatic Reply) | set -u5 %hinick. [ $+ [ $nick ] ] 1 } if ($chan != $active) { echo -a $timestamp $nick said in $chan on $network $+ : $1- | /2 } } }
    if (!$appactive) { if ($away) { if (%hinick. [ $+ [ $nick ] ] != 1) { .notice $nick Away message: $awaymsg (Automatic Reply) | set -u5 %hinick. [ $+ [ $nick ] ] 1 } $tip(High,Highlight Alert, $+ $nick said in $chan on $network $+ : $1- $+ ,30,$null,$null,1,$chan) } }
  }
}
ON $*:ACTION:/\b/Sgi:#:{
  if ($istok($strip($1-),$me,32)) || ($istok($strip($1-),$me $+ 's,32)) || ($istok($strip($1-),$me,44)) || ($istok($strip($1-),$me $+ 's,44)) || ($istok($strip($1-),$me,46)) || ($istok($strip($1-),$me $+ 's,46)) {
    set -u30 %highlighter.chan $chan | set -u30 %highlighter.msg $1- | set -u30 %highlighter.nick $nick | set -u30 %highlighter.network $network
    if ($appactive) { if ($away) { if (%hinick. [ $+ [ $nick ] ] != 1) { .notice $nick Away message: $awaymsg (Automatic Reply) | set -u5 %hinick. [ $+ [ $nick ] ] 1 } if ($chan != $active) { echo -a $timestamp $nick said in $chan on $network $+ : $1- | /2 } } }
    if (!$appactive) { if ($away) { if (%hinick. [ $+ [ $nick ] ] != 1) { .notice $nick Away message: $awaymsg (Automatic Reply) | set -u5 %hinick. [ $+ [ $nick ] ] 1 } $tip(High,Highlight Alert, $+ $nick said in $chan on $network $+ : $1- $+ ,30,$null,$null,1,$chan) } }
  }
}
alias 1 {     
  window -a %highlighter.chan
  window -De @Messages
  echo -t @Messages %highlighter.nick said in %highlighter.chan on $network $+ : %highlighter.msg
}
alias 2 {
  window -De @Messages
  echo -t @Messages %highlighter.nick said in %highlighter.chan on $network $+ : %highlighter.msg
}

Comments

Sign in to comment.
yelow79   -  Sep 25, 2011

This isn't bad. It could be improved but still nice work. Here is mine which may give yourself and blackvenomm666 some ideas.

http://www.hawkee.com/snippet/8893/

 Respond  
MichaelA   -  Sep 23, 2011

Anytime Gillian :) thanks for your nice comments ^_^

 Respond  
MichaelA   -  Sep 23, 2011

blackvenom that is a good plan :D I'll help ya with tests etc if you want ^_^

 Respond  
Gillian   -  Sep 23, 2011

that's right michael.. thanks for your nice comment:p

 Respond  
MichaelA   -  Sep 23, 2011

Thanks Frenetic :) I was drunk when I wrote it lol

Yeah Gillian, agreed. I think people should just code how they want, learn from their mistakes, and keep trying until they get it right :P

 Respond  
blackvenomm666   -  Sep 23, 2011

meh i only tossed that in because i was admin on a couple chatspace servers and didnt want it going off in there. i may change it to have it read from a txt file for channels that they don't want to have their nicks called in:) im also thinking about changing the part with my name to read from a variable and have that variable set from another txt file so people can add other nicks/names and have it cycle through to check all the ones in the txt doc and go off when those are used as well

 Respond  
Gillian   -  Sep 23, 2011

you see frenetic everyone's as a different style of coding.
well done black:)

 Respond  
MichaelA   -  Sep 23, 2011

You could change it from #Services-Diagnostics to let the user set it with a variable :P that way they don't have to change it with the script :3 although I let my highlighter logs my #Services channels anyway xD

 Respond  
Frenetic   -  Sep 23, 2011

Mine is 3 lines, what the hell Blackvenomm666..?

@MichealA, Nice little snippet. :)

 Respond  
blackvenomm666   -  Sep 23, 2011

naw no need to switch it around i have my own nick caller its kind of a big one haha

Menu menubar,nicklist,channel,status,query {
  nick caller
  ..$iif($group(#NickCaller) == On,$style(2)) NickCaller on: { .enable #NickCaller  } 
  ..$iif($group(#NickCaller) == Off,$style(2)) NickCaller off: { .disable #NickCaller }
}

#NickCaller on
on $*:text:$(/\b( $+ $me $+ |Ryan)\b/iS):#:{
  if ($chan != #SERVICES-DIAGNOSTICS) {
    if ($appactive == $false) {
      if ($nick == wulfgar) { halt }
      if ($nick == relaybot) { halt } 
      if ($$1 == !fight) { halt }
      .set %nickcallerinfo $nick called your nick saying $$1- in $chan on $server at $time(h:nn:tt )
      NickCaller
      window @Nick
      aline -p @Nick 4,1 $+ $nick called you at $time(h:nn:tt ) on channel $chan $+  
      aline -p @Nick 4,1 on server $+ $server $+
      aline -p @Nick 4,1and said: $1-
      aline -p @Nick 4,1---
    }
    else { if ($appactive == $true) {
        if ($nick == wulfgar) { halt }
        if ($nick == relaybot) { halt }
        if ($$1 == !fight) { halt }
        If ($Active != $Chan) {
          titlebar DarkRealmIRC $nick said your nick in $chan on $remove($server,.chat,.server) $time(h:nn:tt )
          .set %saidnickchan $chan           
          .set %saidnickserver $server
        }
      }
    }
  }
}
.ignore -pu30 $wildsite

on $*:action:$(/\b( $+ $me $+ |Ryan)\b/iS):#:{
  if ($chan != #SERVICES-DIAGNOSTICS) {
    if ($appactive == $false) {
      if ($nick == wulfgar) { halt }
      if ($nick == relaybot) { halt }
      if ($$1 == !fight) { halt }
      .set %nickcallerinfo $nick called your nick saying $$1- in $chan on $server at $time(h:nn:tt )
      NickCaller
      window @Nick
      aline -p @Nick 4,1 $+ $nick called you at $time(h:nn:tt ) on channel $chan $+  
      aline -p @Nick 4,1 on server $+ $server $+
      aline -p @Nick 4,1and said: $1-
      aline -p @Nick 4,1---
    }
    else { if ($appactive == $true) {
        if ($nick == wulfgar) { halt }
        if ($nick == relaybot) { halt }
        If ($Active != $Chan) {
          titlebar DarkRealmIRC $nick said your nick in $chan on $remove($server,.chat,.server) $time(h:nn:tt )
          .set %saidnickchan $chan
          .set %saidnickserver $server
        }
      }
    }
  }
}
#NickCaller end
alias NickCaller {
  noop $tip(NickCaller,NickCaller,%nickcallerinfo,60,)
} 
on *:ACTIVE:*: {
  if ($chan == %saidnickchan) && ($server == %saidnickserver) {
    titlebar DarkRealmIRC
  }
}

not as big as some i've seen but it works nicely

 Respond  
MichaelA   -  Sep 23, 2011

Lol yeah, I know that, but it wasn't working properly when I did it(could have just been my client), but I found doing it like I did makes it much more simpler, and works(worked(no longer use mIRC)) good for me. If you wanna switch it around a bit, feel free to. :)

Thanks for the feedback though :D much appreciated :3

 Respond  
blackvenomm666   -  Sep 23, 2011

ummm. ok your using regex for it and yet your not taking advantage of regex. your adding in $strip($1-) when regex if done correctly at least auto strips the text. not to mention your putting the regex right into the on text/ on action events but then using an if statement to grab the nick? that doesnt make sense to me. although my understanding of regex is very very limited and i had some help with my nickcaller on the regex portion of it.

on $*:text:$(/\b( $+ $me $+ |Ryan)\b/iS):#:{
on $*:action:$(/\b( $+ $me $+ |Ryan)\b/iS):#:{

that there strips the incoming text on both text and action events and will grab if my nick or my name ryan is said anywhere

 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.