should be
Code:
On *:MODE:#: {  If ( [color:red]$1[/color] == +a) && ( [color:red]$2[/color] == $me) { msg $chan 12Thanks for the & $nick $+ ! (SquishyScript) }}  

the channel isnt $1 its $chan i beleive, havent tested but the help file..
Format: on <level>:MODE:<#[,#]>:<commands>
Example: on 1:MODE:#mIRC:/notice $me $nick changed $chan mode to $1-


billythekid