i see u use mode -o $opnick as the deop command. instead use "on *:OP:#" i think more wisely if u use "on @:OP:#" so firstly script will make sure that u were an op in channel before you set -o mode on the $opnick
since only an op`s can set mode -o on some nick
on *:JOIN:#:if (%CAnti) cs deop # $v1 is this event really works? i mean what if the nick that join not have an op?