Nah, gettok was to keep it more simple; and sorry for the wrong assumtion wink It's possible, e.g. by changing the if-line to:
Code:
  if ($me ison $_botchan) && ($regsubex($regsubex($1,/-\w+/,$null),/[^iRmN]/g,$null)) {
The inner regsubex removes a possible "-<mode(s)>" from $1. The outer regsubex removes any char that is not i,R,m, or N from what's left. If any chars are left now, they should be the mode(s) you're looking for.