http://qs1969.pair.com?node_id=849787


in reply to Re: How do I shut down a Bot::BasicBot?
in thread How do I shut down a Bot::BasicBot?

exit 0 doesn't send a quit message, and I get the error: (in cleanup) Can't call method "post" on an undefined value at /usr/local/lib/perl5/site_perl/5.10.0/Bot/BasicBot.pm line 1500 during global destruction. I'm looking for a way to shut it down cleanly.
  • Comment on Re^2: How do I shut down a Bot::BasicBot?

Replies are listed 'Best First'.
Re^3: How do I shut down a Bot::BasicBot?
by SuicideJunkie (Vicar) on Jul 15, 2010 at 17:32 UTC

    I thought you said that it quit IRC correctly. Is that not the case, or did you replace the shutdown call with the exit?

      If I do an exit 0 after calling shutdown() it doesn't send the quit message to IRC and just exits the script right away.
        and if I do an exit 0 from irc_disconnected_state then it says
        (in cleanup) Can't call method "post" on an undefined value at /us +r/local/lib/perl5/site_perl/5.10.0/Bot/BasicBot.pm line 1500 during g +lobal destruction