Hello,

I've been using POE and POE::Component::IRC for a couple weeks, working
on an IRC bot for our office. My bot is mostly complete now, but I wanted
to add some functions that get executed every X minutes, and one that
executes every night at midnight.

In the _start() function of my script (which is called by the P::C::IRC
module), I have this call:

$kernel->delay_set(do_every_10 => 600); # call this function every 10 min

I have a function in my script called do_every_10(), but it never gets
executed. Another side effect is that pressing CTRL-C does not call my
sigint handler function as long as I have this delay_set call in my
script. If I comment it out, CTRL-C works as expected with sigint.

I've also tried my alarm_set call to set a midnight timer, and this too
never gets called:

$kernel->alarm_set('do_every_day' => &UnixDate(Date_GetNext('today', undef, 2, '00:00:00'), '%s'));

(That uses Date::Manip to get midnight tonight and return it as seconds
since the epoch.)

I am assuming my problem has something to do with trying to combine these
alarms with the use of P::C::IRC. How do I get them to work together?

Thanks!

-thomas



Reply via email to