problem with this is it doesn't accurately account for other modes that take parameters that may also have been set alongside the modes you're checking for. for +ohv, this is easy enough by handling the mode string with $mode(). for +a and +q it's a little more difficult, involves parsing the string of modes and comparing it to values in $chanmodes

$chanmodes returns 4 tokens delimited by a comma. the first are the list modes, when you receive these from the server they take a parameter both when being set and unset. the second also take a parameter when set and unset. the third take a parameter when being set, but not when being unset... and the last never take any parameters

i believe there's a few snippets that pick out modes for you on mircscripts.org's snippets section.. so give that a look :tongue:

btw, +q can be detected with an on *:owner event, which functions much like an op event, $opnick is the person being ownered. on *:deowner exists too, and again $opnick is used


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde