I had the need to register my nick with a nick registration service on a particular IRC channel. I have tended to use xchat as it is available and simple to use.
To save me some time and so I don't have to remember to do it every time I thought I would automate this login.
In xchat's network list select the irc server you are connecting to and click edit, which will bring up a screen similar to the following
Edit Network dialog box |
In the "Connect command" box I added the command
load -e <filename>
where filename contained the commands I needed to login with the nick registration service (minus the leading "/" is would normally use with interactive commands). The commands were similar tomsg <registration service> login <nick> <password>