mIRC Home    About    Download    Register    News    Help

Print Thread
#72921 27/02/04 02:50 PM
Joined: Feb 2004
Posts: 1
O
Mostly harmless
OP Offline
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.

Joined: Dec 2002
Posts: 774
T
Hoopy frood
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
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
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!
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
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!!!!!!!
  }
}


Link Copied to Clipboard