on *:op:#: { if ($opnick == $me) { Inc %OPCount | msg $chan Thanks $nick ! I have been oped %OPCount times } }
It should look like this to work..