Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Interfaces\RateLimiter Interface Reference

Interface used to implement a rate-limit on the number of messages the bot may send to any IRC server. More...

Public Member Functions

 canSend ()
 

Detailed Description

Interface used to implement a rate-limit on the number of messages the bot may send to any IRC server.

Definition at line 28 of file RateLimiter.php.

Member Function Documentation

Erebot\Interfaces\RateLimiter::canSend ( )

Decides whether a message can be sent or not, using whatever strategy deemed useful. Classes implementing this interface are responsible for keeping track of the measurements required for their proper functioning.

Return values
booltrue if the message can be sent, false otherwise.
Note
If an exception is thrown by this method, an implicit return value of true may be assumed by its caller to avoid deadlocks.

The documentation for this interface was generated from the following file: