mIRC Home    About    Download    Register    News    Help

Print Thread
Highlight #254055 20/07/15 01:36 PM
Joined: Aug 2012
Posts: 59
Maelish Offline OP
Babel fish
OP Offline
Babel fish
Joined: Aug 2012
Posts: 59
Is there a way to include channel name with the keyword in Highlight in order to highlight in a specific channel only?


Find Gamers, my player finder for tabletop RPGers and Wargamers.
Re: Highlight [Re: Maelish] #254072 21/07/15 06:21 AM
Joined: Sep 2014
Posts: 259
S
Sakana Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Make a custom script instead of using options.

Code:
on *:START:{ window -a @Highlights }

on *:TEXT:*:#:{
  if ($regex($1-,/\b $+ $me $+ \b/gi)) {
    echo @Highlights # -- $nick -- $time -- $1- 
    beep 3 1000
  }
}


I made this for my highlights. You just need to add an IF statement that checks if the highlight is from that specific chan

Last edited by Sakana; 21/07/15 06:22 AM.
Re: Highlight [Re: Sakana] #254084 21/07/15 03:14 PM
Joined: Aug 2012
Posts: 59
Maelish Offline OP
Babel fish
OP Offline
Babel fish
Joined: Aug 2012
Posts: 59
Thanks!

Last edited by Maelish; 21/07/15 04:20 PM.

Find Gamers, my player finder for tabletop RPGers and Wargamers.
Re: Highlight [Re: Maelish] #254086 21/07/15 05:21 PM
Joined: Jul 2006
Posts: 3,741
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,741
You can technically use the entry added to the highlight section with your script:

$highlight(text) will return something if text is matching any entry in the highlight section.
There is one problem with this, it's if you happen to have entries being numbers. Indeed $highlight(0) returns the number of entries in the highlight section, it doesn't check if '0' matches any of these entries.
So the solution is pretty simple:

Code:
on *:text:*:#channelforhighlight:{
  if ($1- !isnum) && ($highlight($1-) != $null) {
    echo $chan you're getting highlighted!!
  }
}


Note that 100% working code is possible but require much more code, the above is a simple solution working in almost all cases, see http://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/189847 and http://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=196007&page=0#Post196007

Last edited by Wims; 21/07/15 05:37 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Highlight [Re: Wims] #254271 31/07/15 12:20 PM
Joined: Aug 2012
Posts: 59
Maelish Offline OP
Babel fish
OP Offline
Babel fish
Joined: Aug 2012
Posts: 59
Cool, nice follow up post.


Find Gamers, my player finder for tabletop RPGers and Wargamers.