Inspired by a future need for the Cogers Society to do online debating, I decided to have a go at writing an IRC bot. This was my first attempt.
I decided on Bot::BasicBot as a start point - I had heard good things about this module. I picked Time::Piece and Parse::RecDescent as two modules to use that I am already familiar with.
I found when developing this that lanching the bot gave two warnings about calls to
new() being deprecated in POE::Component::IRC. I happened to be in correspondence with the module's author later, and prodded jerakeen (author of Bot::BasicBot) via RT. The outcome is that Bot::BasicBot has now been brought up to date and everyone's happy.
The idea is to give cronic fairly simple commands, such as:
cronic: at 12:30 say It's lunch time
cronic: after 5:00 say Your five minutes are up
The bot will ignore any text on the channel for which it has not been directly addressed. The bot will also respond to PRIVMSG, allowing personal reminders.
There's still plenty of things for me to do:
Implement time zones; migrate to DateTime. Work in progress. This has involved me grokking DateTime and associated modules.
Documentation. I need to put up a webpage somewhere with "how to use this bot".
Persistent events in a database. These could include perl monger meeting reminders and people's birthdays.
More commands than just "say". It would be useful for cronic to switch the topic, for example.
The bot is up and running on #bots for those who want to have a play. I'll try and catch any scrollback, but if you want, you can email bug reports to cronic at xemaps.com.