Code:
on @*:op:*:if ($level($address($opnick,2)) == 30) { mode $chan -o $opnick | halt }

on @*:serverop:*:if ($level($address($opnick,2)) == 30) { mode $chan -o $opnick | halt }