Skip to content
Internet Relay Chat bot
Find file
Pull request Compare This branch is 112 commits ahead, 120 commits behind serpis:master.
Latest commit fcd72ad @dentarg Add simple Ansible deploy
Failed to load latest commit information.
data Include the data directoy in the reository
httpsrv removed executable on .py files
ircclient Unicode sandwich 🍞
plugins Remove leading and trailing whitespace from title
.gitignore Move bot configuration to environment variables
BUGS Added probable bug when shuting ircbot down.. Update list of dependencies
ansible.cfg Add simple Ansible deploy
creds.txt remove all trailing whitespace
deploy.yml Add simple Ansible deploy
hosts Add simple Ansible deploy Unicode sandwich 🍞
license.txt Grrr... Admin privilege check fixed now, probably needs restart :( remove all trailing whitespace Unicode sandwich 🍞 remove all trailing whitespace Improve title channel list parsing


A Python IRC bot.

Environment variables

Configure your bot with the following environment variables:

Environment variable Description
SERVER IRC server the bot should connect to.
SERVER_PORT IRC server port.
NICK Nickname of the bot.
USERNAME Username part of the bot hostmask.
REALNAME Real name of the bot.
ADMINS Nicknames with bot admin privileges.
CHANNELS Channels the bot should join on start.
TITLE_CHANNELS Print the <title> of URLs in these channels.
twitter_consumer_key Twitter API key.
twitter_consumer_secret Twitter API secret.

Twitter API keys are required by See for more info.

If you put the environment variables in a file named .env, you can use Honcho to start the bot.

Example of a .env file:

REALNAME="Freeze? I'm a robot. I'm not a refrigerator."
ADMINS="dentarg, serp"
CHANNELS="#foo, #bar, #baz"
TITLE_CHANNELS="#foo, #bar"



Pynik make use of the following Python libraries:


Install dependencies for dependencies, most of them are for cryptography, which is used by requests.

sudo apt-get install -y build-essential libssl-dev libffi-dev python-dev python-setuptools

Install bot dependencies.

sudo easy_install pip

noglob sudo -H pip install --upgrade python-twitter requests[security] chardet beautifulsoup4 html5lib

Install Honcho if you don't have it

pip install honcho

Start the bot

honcho run python
Something went wrong with that request. Please try again.