I'm making a Perl IRC bot and I want to send a message periodically to a channel. I'm using POE::Component::IRC, but as far as I can see, there is no method or event handling this.
Is there a way to accomplish this?
I'm making a Perl IRC bot and I want to send a message periodically to a channel. I'm using POE::Component::IRC, but as far as I can see, there is no method or event handling this.
Is there a way to accomplish this?
You can use POE::Kernel's delay
routine to act like a one-time timer calling itself over and over.
Basically, you have an event handler named my_event
. Within my_event
, you send the PRIVMSG to the channel. You then call this same event handler my_event
using the delay
routine inherited through POE.