@heartbroken no need for a dialog for oper try this as a nother script
on *:CONNECT:{ if ($server == chat-name1) { oper your_nick pass } }
or if you know the network name change $server to $network and it will auto oper you on start up :)