Looks like you missed a bit:
on :Op:#:{
if ($opnick == $me) && ($nick == $me) msg $chan I opped myself.
else if ($opnick == $me) msg $chan Thanks for the op $nick
}
on :Voice:#:{
if ($vnick == $me) && ($nick == $me) msg $chan I voiced myself.
else if ($vnick == $me) msg $chan Thanks for the voice $nick
}
Without the if ($opnick == $me) and if ($vnick == $me) parts in the else statement, it thanks when anyone gets op or voice, which is probably not what you want.
I know this is an old snippet by the way....i'm just pointing this out in case anyone comes across it and decides to use it like I did the other day.
I also edited out the colours and changed the + and @ parts to suit my own use.