mIRC Home    About    Download    Register    News    Help

Topic Options
#72921 - 27/02/04 02:50 PM Highlight-triggered scripts
OfOrosian Offline
Mostly harmless

Registered: 27/02/04
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.

#72922 - 27/02/04 04:54 PM Re: Highlight-triggered scripts
theRat Offline
Hoopy frood

Registered: 11/12/02
Posts: 774
on *:text:*:#: {
if (( $1 !isnum ) && ( $highlight($1-) )) {
echo $color(highlight) -t $chan WARNING! WARNING! HIGHLIGHT!!!!!!!
and same with on action?
//if ( khaled isgod ) echo yes | else echo no

#72923 - 01/03/04 02:29 PM Re: Highlight-triggered scripts
Doqnach Offline
Hoopy frood

Registered: 18/01/03
Posts: 1063
$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!

#72924 - 02/03/04 06:58 AM Re: Highlight-triggered scripts
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Should check if the whole string is (not) a number, not only the first word.
on *:text:*:#:{
  if $1- !isnum && $highlight($1-).color {
    echo $ifmatch -ita # WARNING! WARNING! HIGHLIGHT!!!!!!!