Simple Highlight with pop-up

By ChanZin on Jun 06, 2010

Put it in your remote and wait someone highlight you or open/send private message

=)

on *:open:?:highlightpopup 1
on *:text:*:*:highlightpopup $iif(#,2,1) $1-
on *:action:*:*:highlightpopup $iif(#,2,1) $1-
alias highlightpopup {
  if (!$istok(HostServ NickServ ChanServ *highlight,$nick,32)) {
    if (!$tip($nick $iif($1 == 1,pvt,#) $network) && $iif($1 == 2,$iif($me isin $strip($2-),1,0),1)) {
      noop $tip($nick $iif($1 == 1,pvt,#) $network,$nick,$iif($1 == 1,4Mensagem Privada,3 $+ # $+   ) @ $network,30,,,window -ax $iif($1 == 1,$window($nick),$window(#)))
    }
    if ($iif($1 == 2,$iif($me isin $strip($2-),1,0),0)) {
      if (!$window(@HighLight@ $+ $network)) { window -nk0 @HighLight@ $+ $network }
      echo @HighLight@ $+ $network $timestamp 4 $+ $nick 3highlighted you on4 # $+  | window -g2 @HighLight@ $+ $network | window -g2 #
    }
  }
}

Comments

Sign in to comment.
ChanZin   -  Jun 15, 2010

updated =-)

 Respond  
Jethro   -  Jun 07, 2010

Yeah I know what it means. It means a thing or person in small, little size. Are you a small person or something? :p Or are you talking about some diminutive figures that pop up both right and left on your shoulders? They are the angel and devil that represent your conscience and ego.

 Respond  
ChanZin   -  Jun 07, 2010

You know some people call you in diminutive. ChanZiny (i don't know exactly how use diminutive in english, but you understood :P)

Anyway, Thanks for posting your code. :-)

 Respond  
Jethro   -  Jun 07, 2010

Spelled your name wrong. I edited it.

 Respond  
Jethro   -  Jun 07, 2010

In that case, use regex:

alias test {
  echo -a $iif($regex($1-,/\bchanzin\b/iS),$v1,0)
}

It'll return 1 if matched, 0 if unmatched.

/test Are you there ChanZin? returns 1
/test Let's add something to 123ChanZinHere returns 0

Now, by using isin, it'll return true if "123ChanZinHere" is said.

 Respond  
ChanZin   -  Jun 07, 2010
Are you there ChanZin

returned $true

Are you there ChanZin?

nothing returned

 Respond  
Jethro   -  Jun 06, 2010

Have you tested it?

I'll give you two examples:

alias test {
  $iif($istok($1-,ChanZin,32),echo -a $v1)
}

This will solely return $true if you enter: /test chanzin

Now this is what you have in you code:

alias test {
echo -a $iif(ChanZin isin $1-,TRUE,FALSE)
}
Yes, it'll return true if chanzin is said and matched. Now if I enter:

BlahChanZin or ChanZinBlah or ChanZin123

They will all return TRUE.

You should also take note that the $istok order I have. It's $1- comes first before your own nick. We want to match the nick ChanZin exactly the way it is.

 Respond  
ChanZin   -  Jun 06, 2010

if use $istok, if someone says "ChanZin." it wont work.

 Respond  
Jethro   -  Jun 06, 2010

It's deemed not a good idea using isin because if someone has a similar name like yours, that'll prompt your script to get triggered. Use

$istok($strip($1-),$me,32)

It's more of a foolproof approach.

 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.