IRC bot development
I have been working on some more projects around IRC chat bots. I decided to try and integrate a Magic 8 ball project so that an IRC bot would give a random response, chosen from a pre- defined set within the code (can be changed) when the bot is sent an instruction in my IRC channel.
This project builds on some of the code covered in my Minecraft Pi bot project. Mostly the base code from the Linux Voice article.
The code is currently being tested in ##zleap on Freenode.
At the moment magic8 can be sent the following commands:-
- !umame – returns output of uname -a
- !uptime – returms system uptime
- !help – displays list of options
- !botexit – bot quits irc channel,
- !magic8 – returns random text
- !ping – returns pong (used to check the bot is working, left in for legacy
- !web – returns my own web address (this website) but can be changed
- !sdtj – returns web address for the South Devon Tech Jam
uname and uptime are Linux / Unix commands, it is therefore assumed you are running on a GNU / Linux system.
I have created a welcome message from the bot, so when it joins it says hello, also says goodbye if !botexit is sent.
- Make the code Python 3
- Add more options
- Keep it tidy
Help and Contribute
Feel free to fork the project and make improvements and further customization. Perhaps discuss further on IRC or via social media e.g Mastodon.