Open NanoSector opened 9 years ago
I'll take a look when I have some time, shouldn't be too hard
+1 I could really need something like this for my implementation of the IRC-Bot ;)
Okay. You can just hook into the main loop. We could use something similar to Listeners, the new log system makes use of this.
Do the modules themselves need to do the actual interval work, or can we make the bot handle the intervals themselves?
Perhaps it would be nice if functions could be executed on a certain interval. E.g. get the latest Github commits every hour and display them. Or clean up logs every day.
The principle would be the same as the Listener structure, except it's triggered in a different way.
I don't have ideas how a scheduler in PHP would work, so if this is agreed on that's something to work out.