mIRC Homepage
Posted By: StrawberryKitty Network specific highlighting - 31/05/10 12:37 PM
Network specific highlighting would be a very useful feature, I keep getting highlights across networks for things that aren't specific to that network. Would be a great feature ^^
Posted By: drum Re: Network specific highlighting - 31/05/10 07:09 PM
This could be a useful feature if it was integrated into the UI. However, there is a workaround you can use to get this behavior in the meantime.

Let's say you want to highlight the word "strawberry" when it appears on any channel on EFnet, but not any other network. You could do that by first creating a custom alias in the remotes section like this:

Code:
alias hl-strawberry { if ($network == EFnet) { return strawberry } }


Then, you would set the highlight text to:

Code:
$hl-strawberry


This would give the desired result.

Another common example might be if you want to match when anyone uses whatever nickname you are currently using, which can be done more simply by just setting the highlight text to

Code:
$me
Posted By: StrawberryKitty Re: Network specific highlighting - 04/06/10 06:51 AM
Hum thanks for the work around I'd still like if it was added to the GUI :3
Posted By: StrawberryKitty Re: Network specific highlighting - 04/06/10 08:45 AM
Mew unfortunatly I can't seem to get it working with wild cards...

I tried this:

Code:
alias hl-straw__ {
  if ($istok(fakeºnotrealºboo,$network,186)) {
    return Straw *
  }
}


then added "$hl-straw__" to my highlights and typing "straw mew" did not set off the highlight. I then tried this:

Code:
alias hl-straw {
  if ($istok(fakeºnotrealºboo,$network,186)) {
    return Straw
  }
}


and added "$hl-straw *" same problem it doesn't trigger..

I'm guessing the wild card loses it's special quality when return is used.. Any ideas? *Hopes for a GUI version* ^^;
Posted By: argv0 Re: Network specific highlighting - 04/06/10 05:00 PM
Wilcards are not necessary there. Adding network support to the GUI won't change that fact. just use $hl-straw and that's it, it will match "Straw" anywhere in the line.

As a sidenote, why on earth are you using $chr(186) (a NON-ASCII character) as a token delimiter in your hardcoded data? Use a sane value, like a space.
Posted By: drum Re: Network specific highlighting - 04/06/10 06:50 PM
I also can't get wildcards to work when using this method. To be honest, I'm not even sure if using identifiers with the highlight feature is intended behavior -- I just know that it works, at least in a limited capacity.

Sorry but I don't see a workaround for you at this time.
Posted By: drum Re: Network specific highlighting - 04/06/10 06:55 PM
She may want the wildcards so that she can enforce spaces around the matchtext though. Normally the highlight feature does support wildcards if they are used. Perhaps a regex version would work.
Posted By: Tomao Re: Network specific highlighting - 05/06/10 08:40 AM
mirc's inbuilt highlight feature supports regex. She may be able to use the $highlight() identifier with an alias, $network = to return the match she wants.
Posted By: StrawberryKitty Re: Network specific highlighting - 05/06/10 10:28 AM
That'd be great if I knew how I guess ^^;
© mIRC Discussion Forums