Ircrc

% ircrc -p 31337 -r $user -n $user -T example.com

Then type:

/q PASS $user/$network:$password

If you need to switch networks:

/q znc jumpnetwork $network