mIRC Home    About    Download    Register    News    Help

Print Thread
#226056 17/09/10 08:22 AM
Joined: Nov 2009
Posts: 81
V
Voglea Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
How to fast check string for highlights?

Request snippet smile
Highlights sets in Alt + B "Highlight" dialog.

on ^&*:TEXT:*:#: {
; if highlight is turned on
if ($highlight) {
if ($check_for_highlight($1-)) {
echo highlight!
}
}
}

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
See /help $highlight
Second entry: $highligh(N/text) returns a value if <text> matches a highlight.

Joined: Nov 2009
Posts: 81
V
Voglea Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
oh. thanks

Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
assuming you don't have numerical highlight entries, you might also want to throw in an extra little check:

Code:
if ($1- !isnum) && ($highlight($1-)) { 




"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard