Skip to content

Instantly share code, notes, and snippets.

@jjasghar
Forked from stephenyeargin/hubot-and-znc.md
Created June 13, 2014 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjasghar/b13645e455bc49efaefc to your computer and use it in GitHub Desktop.
Save jjasghar/b13645e455bc49efaefc to your computer and use it in GitHub Desktop.

This was a bit of a trick to get set up, so here it is for anyone who comes across it in search results.

ZNC User Account

  • 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 or respond 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.

Hubot

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment