That would be on CONNECT, a separate event.
Code:

on *:CONNECT: if ($network == YourNetwork) oper opernick operpass