Here are my ideas/methods:
Want to just see if it's to the room or not?
if ( $target == $chan ) { ;to entire room }
Can't get easier than that
But that won't tell you if it's to OPs only, Voices only, or both.
The IRC's that I use don't support +#roomname for notices, only @#roomname, so I can only guess how the $target would appear if it's sent to both @ and +
alias targets {
tokenize 32 $1- | ;Dummy proofing, don't ask
tokenize 32 $iif($1,$1,*) $gettok($target,1,35)
return $iif($1 == *,$2,$iif($1 == $2,$true))
}
I haven't tested this thing out, but it should work.
if ( $targets(@) ) { ; notice is to OPs only }
if ( $targets(+) ) { ; notice is to Voices only }
if ( @ isin $targets(*) ) { ; notice is to OPs (but may be to Voices too) }
I saw a reference to omsg not working the same as onotice.. I say it depends on the method you use.
alias o { .notice $+(@,#) $1- | echo -t # Ops $+(#,:) $1- }
/o hey ops, I'm here!
That'll do the same thing as onotice, BUT it won't matter if you're OP'd or not. We use the same concept because then if an op is voiced down, they can still send the rest of us ops notices without getting error messages. (/o is way easier to type than /onotice by the way, but if you use /o for something else, then you can make it /ops, etc)
EDIT: Forgot to mention that the same idea can be tried for sending op messages.. /msg $+(@,#) $1-