Ignore:
Timestamp:
Dec 15, 2009, 12:03:05 AM (15 years ago)
Author:
Alex Vandiver <alexmv@mit.edu>
Branches:
master, release-1.10, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
cd12307
Parents:
62c91c1
git-author:
Alex Vandiver <alexmv@mit.edu> (12/12/09 00:25:49)
git-committer:
Alex Vandiver <alexmv@mit.edu> (12/15/09 00:03:05)
Message:
Reconnect and re-join channels on IRC disconnect
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Module/IRC.pm

    rf1a2736 r3b4ba7d  
    3030our %ircnets;
    3131our %channels;
     32our %reconnect;
    3233
    3334sub startup {
     
    378379
    379380    if ($conn->conn->connected) {
    380         BarnOwl::admin_message("IRC", "Connected to $alias as $nick");
    381         $ircnets{$alias} = $conn;
    382         my $fd = $conn->getSocket()->fileno();
    383         BarnOwl::add_io_dispatch($fd, 'r', \&OwlProcess);
    384         $conn->{FD} = $fd;
     381        $conn->connected("Connected to $alias as $nick");
    385382    } else {
    386383        die("IRC::Connection->connect failed: $!");
     
    394391    my $conn = shift;
    395392    $conn->conn->disconnect;
    396     delete $ircnets{$conn->alias};
    397393    return;
    398394}
Note: See TracChangeset for help on using the changeset viewer.