WildPHP / irc-bot

A simple and modular PHP IRC bot
MIT License
84 stars 24 forks source link

Queue system #65

Closed NanoSector closed 7 years ago

NanoSector commented 8 years ago
    /**
     * An explanation of how this works.
     *
     * Messages are to be 'scheduled'. That means, they will be assigned a time. This time will indicate
     * when the message is allowed to be sent.
     * This means, that when the message is set to be sent in time() + 10 seconds, the following statement is applied:
     * if (current_time() >= time() + 10) send_the_message();
     *
     * Note greater than, because the bot may have been lagging for a second which would otherwise cause the message to
     * get lost in the queue.
     */
NanoSector commented 7 years ago

Done!