why not just this?
on *:text:`lolop*:#: { if ($2 != $me) && ($2 ison $chan) { mode $chan +o-o $2 $2 } }