Then you have something messed up.
The line you pasted but parsed the way I code:
Code:
on *:rawmode:#: { 
  if (+*a* iswmcs $1) { 
    msg $chan Thanks for the +a 
  } 
  elseif (+*q* iswmcs $1) { 
    msg $chan thanks for the +q 
  } 
} 

Result:
Quote:

(Tue 10:25:22 pm) * Topic is ''
(Tue 10:25:22 pm) * Set by ChanServ on Wed Aug 25 06:04:36
(Tue 10:25:22 pm) * Bot sets mode: +oq Static Static
(Tue 10:25:22 pm) <~Static> thanks for the +q
(Tue 10:26:23 pm) <~Static> !protect
(Tue 10:26:23 pm) * Bot sets mode: +a Static
(Tue 10:26:23 pm) <~Static> Thanks for the +a