I believe this is what you're looking for:
On *:NOTICE:*:#: {
if ( $target == @$chan ) echo -a Op Notice
if ( $target == +$chan ) echo -a Voice Notice
if ( $target == @+ $+ $chan ) echo -a Op & Voice Notice (same as Voice Notice, but some networks display it differently. I think Ops can always see Voice Notices).
}
There are a variety of methods you can use, but you're basically checking $target for the @ prefix. Unfortunately networks vary so dramatically on how prefixes are displayed and what prefixes are supported that it's becoming very difficult to acknowledge a standard.
- Raccoon