mIRC Homepage

Highlight

Posted By: Maelish

Highlight - 20/07/15 01:36 PM

Is there a way to include channel name with the keyword in Highlight in order to highlight in a specific channel only?
Posted By: Sakana

Re: Highlight - 21/07/15 06:21 AM

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
Posted By: Maelish

Re: Highlight - 21/07/15 03:14 PM

Thanks!
Posted By: Wims

Re: Highlight - 21/07/15 05:21 PM

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
Posted By: Maelish

Re: Highlight - 31/07/15 12:20 PM

Cool, nice follow up post.
© 2021 mIRC Discussion Forums