(just replying to the this one, not saying the code is wrong)
and just to go a slightly different way, you could do this:
on *:RAWMODE:#:{
if ($2 == me) {
if ($1 == +v) { msg # 4Thanks for the 15+4 $nick $+ ! }
if ($1 == +o) { msg # 4Thanks for the 15@4 $nick $+ ! }
}
}
Just showing another way to do it.