Snippets Project Page
Author: maroon
Added: 5y
Updated: Never
mIRC: used 6.35 & 7.52+
Hits: 1,046
Downloads: 7
Review: entropy
Size: 1.67KB
1 0
Login to vote.
Highlight rule valid in/except ONE channel
v1.0
Shows how to create a highlight rule that works ONLY in 1 channel, or works EXCEPT IN 1 channel.
All you need to do is edit the text of your highlight rule to use this identifier. If the rule is for:
text
then edit the rule to be:
$hilite_only(#test text)
and the rule highlights only in channel #test when that same text is used.
Download
JSON
▲ Review
▼ Source
; Allows a highlight rule to either be valid in only 1 channel ; or be valid everywhere except 1 channel ; Making sure "enable highlight" is checked, create the rule in AddressBook/highlight for ; matching on the desired "message" or "nickname" or "both": ; $hilite_only(#channelname key words) ; $hilite_except(#channelname key words) ; and add your colors, sound, flash, etc. This rule will match when someone types: ; test key words ; does not match for "test key" or "test key words2" ; As long as the 1st word is the name of the channel, the rule's text can be 1 or more words ; This lets you ignore 1 channel that uses your nick but highlight in all other channels: ; $hilite_except(#channelname $me) alias hilite_only if ($chan == $gettok($1,1,32)) return $gettok($1,2-,32) alias hilite_except if ($chan != $gettok($1,1,32)) return $gettok($1,2-,32) ; Known limitation: ; This method does not work if your rule text contains a comma ; $hilite_only(#channel test,message) ; mIRC doesn't call the identifier when $1- contains a comma. To put comma into match text: ; $hilite_only(#channel test $+ $chr(44) $+ message) ; This 2nd pair shows how to have the word or words match only in 2 channels, or except in 2 channels ; Create the rules like ; $hilite_only2(#channel1 #channel2 key word or words) ; $hilite_except2(#channel1 #channel2 key word or words) alias hilite_only2 if ($istok($gettok($1,1-2,32),$chan,32)) return $gettok($1,3-,32) alias hilite_except2 if (!$istok($gettok($1,1-2,32),$chan,32)) return $gettok($1,3-,32)
Changelog:
0
0