Unless you are an IRC Operator and you have access to op yourself on a channel, then that would not work. You would need to send an op command to ChanServ or whatever the Channel Management service is (if any).

You could just add to the existing code also.

Example:

on 1:INPUT:#:{
if ($1 == specialop! && $me isvoice $chan && $me isop $chan) { mode $chan -v $me }
if ($1 == specialop! && $me isop $chan) { mode $chan -o $me }
if ($1 == op! && $me !isvoice ) { msg ChanServ voice $chan $me }
if ($1 == op! && $me !isop $chan) { msg ChanServ op $chan $me }
}

You don't seem to understand what it's checking for so I'll explain a bit.

$me isvoice $chan - Checks if you are VOICED on the channel
$me !isvoice $chan - Checks if you are DE-VOICED on the channel
$me isop $chan - Checks if you are OPPED on the channel
$me !isop $chan - Checks if you are DE-OPPED on the channel