Ask MetaChat: Programming. I've got an IRC bot that I've customized a fair bit (the example bot that comes with Perl's NET::IRC module).
→[More:]
The bot is entirely reactive, ie, it waits for someone to say something, then it responds accordingly. Until something happens on the channel, the bot is in a waiting state.
I'd like to make it aware of time, and be able to perform actions at specific times. What's the best way to do this? The easiest way would be to have it check the time every time it receives a channel event. This is clearly not a good solution. Is there a better way to do this without changing the entire architecture of the program?