there's a subtle difference, $istok() isn't case sensitive, although i would opt for $istokcs() here if case is an issue.. $regex() is overkill

i realize +a cannot be set on a nick with other arbitrary modes (at least, if i remember right), but here's a code that parses any mode string and signals an event when +a or -a is detected on a nick:

Code:
on *:rawmode:#:{ 
  if (*a*,*,*,* iswmcs $chanmodes) {
    var %a = 1, %b, %c = 2
    while ($mid($1,%a,1)) {
      if ($v1 isin +-) %b = $v1
      if ($v1 === a) .signal a $+ %b # $($ $+ %c,2) $nick
      if ($regex($nickmode $chanmodes,/(?:^|,)(?=.* $v1 )/g) %b isin 3 +1 %b 2 %b) inc %c
      inc %a
    }
  }
}

on *:signal:a?:{
  /*

  in here, $signal = a+ or a- for whether mode a was given or taken
  $1 is the channel
  $2 is the affected nick
  $3 is the nick who did the mode change  
  
  */ 
}


if anything this can serve as an example of how to parse a mode string with minimal code :P

i believe you can use on *:owner:#: and on *:deowner:#: for +q and -q with the expected $nick/$chan/$opnick identifiers. the extent of its support has been discussed in the past but i can't really remember what the deal was. try it out and see


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