|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
OP
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
There's $highlight(N/Text).nicks returning $true/$false if a highlight was set to "match nicknames". Is there a corresponding property for "match messages", to determine which of the three possible options (match nick/message/both) was set? I didn't find it in the helpfile, or by guessing. Checking text is ok by something like: if ($highlight($nick) && $highlight($nick).nicks) { -- mach nicks -- }
if ($highlight($1-) && ($1- !isnum)) { -- match message -- } But checking the Nth highlight: if ($highlight(N).nicks) { -- match nicks -- }
if ($highlight($highlight(N))) { -- match message -- } ...won't work if the highlight is a regex or identifier
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I'd call this either a bug, unintentional overlook, or a decent addition for the feature suggestions section.
|
|
|
|
Joined: Jul 2006
Posts: 4,193
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,193 |
Why not read the information from the mirc ini file, under the Highlight section ? n0=0,1,1,1,"","","$me",0,0,0,3 < Both n0=0,1,0,1,"","","$me",0,0,0,3 < Message n0=0,1,2,1,"","","$me",0,0,0,3 < Nickname
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
OP
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
I do, but wondered - if there's the one property shouldn't exist the other one as well? As other properties aren't in the helpfile [yet], like .tip = tip delay, maybe it exists and we don't know of it Here's the awkward thing I use for the moment: ; $hltarget(N) - returns "match on:" definition of Nth highlight: "message", "nick", or "both"
alias hltarget { return $replace($gettok($readini($mircini,highlight,$+(n,$calc($int($$1) -1))),3,44),0,message,1,both,2,nick) }
|
|
|
|
Joined: Jul 2006
Posts: 4,193
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,193 |
maybe it exists and we don't know of it Maybe, but I don't think so. You could add this as a suggestion, two propriety .message and .both, or something like .method, that would return the used method (nick, message or both).
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|