mIRC Home    About    Download    Register    News    Help

Print Thread
Highlight-triggered scripts #72921
27/02/04 02:50 PM
27/02/04 02:50 PM
Joined: Feb 2004
Posts: 1
O
OfOrosian Offline OP
Mostly harmless
OfOrosian  Offline OP
Mostly harmless
O

Joined: Feb 2004
Posts: 1
Just a quickie to ask for a command, for example on highlight, so that i may write a script to trigger whenever something on the highlight list is typed. I don't suppose it'd be too hard, and it'd prove most handy, at least to myself.

Re: Highlight-triggered scripts #72922
27/02/04 04:54 PM
27/02/04 04:54 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
theRat  Offline
Hoopy frood
T

Joined: Dec 2002
Posts: 774
on *:text:*:#: {
if (( $1 !isnum ) && ( $highlight($1-) )) {
echo $color(highlight) -t $chan WARNING! WARNING! HIGHLIGHT!!!!!!!
}
}
and same with on action?


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Highlight-triggered scripts #72923
01/03/04 02:29 PM
01/03/04 02:29 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Doqnach  Offline
Hoopy frood
D

Joined: Jan 2003
Posts: 1,063
$highlight should have a second parameter, $highlight(N/text,n) where n makes sure the first parameter specified is a number with the purpose to retrieve a highlight, without n specified the first parameter would be a text...

you also should be able to specify if the text you put in is the nick, because highlighting can be done on nicks but there is no good way to check on it without using a huge script to first retrieve all options of a $highlight and manually comparing...

there are also a few bugs in $highlight you should be aware off...

I think $highlight needs a good work over!

there have been a few suggestions for improvements already (among which one of mine for regexp support)


If it ain't broken, don't fix it!
Re: Highlight-triggered scripts #72924
02/03/04 06:58 AM
02/03/04 06:58 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Iori  Offline
Hoopy frood
I

Joined: Aug 2003
Posts: 1,831
Should check if the whole string is (not) a number, not only the first word.
Code:
on *:text:*:#:{
  if $1- !isnum && $highlight($1-).color {
    echo $ifmatch -ita # WARNING! WARNING! HIGHLIGHT!!!!!!!
  }
}