diff options
author | David Phillips <david@sighup.nz> | 2017-07-26 22:22:26 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-07-26 22:22:26 +1200 |
commit | 80af35e960b379d4aea5166ba51d77a2142ab491 (patch) | |
tree | 0e754b4e4d9d9afdd0d23b32b0bbb4ee7baee88c | |
parent | e258d5a64d837681fbb870943c8a191d7ffd626c (diff) | |
download | idalius-80af35e960b379d4aea5166ba51d77a2142ab491.tar.xz |
Detect socket and IRC errors, reconnect upon them
-rwxr-xr-x | idalius.pl | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -52,7 +52,9 @@ POE::Session->create( irc_public irc_msg irc_nick - irc_disconnected ) ], + irc_disconnected + irc_error + irc_socketerr) ], ], heap => { irc => $irc }, ); @@ -194,6 +196,14 @@ sub irc_disconnected { $irc->yield(connect => { }); } +sub irc_error { + $irc->yield(connect => { }); +} + +sub irc_socketerr { + $irc->yield(connect => { }); +} + sub _default { my ($event, $args) = @_[ARG0 .. $#_]; my @output = ( "$event: " ); |