This was a bit of a trick to get set up, so here it is for anyone who comes across it in search results.
- Set up the account as usual (note the username and password)
- Set the defualt buffer size to 0. Every time the bot reconnects after a crash, it would try to respond to the commands it
hear
orrespond
in the buffer, and might crash it again. - Go ahead and define a network and channel for your bot. Note the
network
name. - You should now see a "ghost" for your hubot connected.
- Look at the ZNC user list. The hubot user will show 1 network, but 0 clients.
If you are already using the IRC adapter, you just need to adjust some of the environment variables.
export HUBOT_IRC_SERVER="{servername}"
export HUBOT_IRC_PASSWORD="{username}/{network}:{password}"
export HUBOT_IRC_PORT="8080"
export HUBOT_IRC_ROOMS="#hubot"
Start the hubot through your normal process (supervisor, init.d, other daemon, etc.).
You should now see that one client is connected on the User tab in ZNC. If so, test your bot out in a connected channel.
That's it!