Ignore:
Timestamp:
Aug 8, 2013, 3:51:55 PM (11 years ago)
Author:
Jason Gross <jgross@mit.edu>
Branches:
master, release-1.10
Children:
76e80de
Parents:
ae2b830
git-author:
Jason Gross <jgross@mit.edu> (01/05/13 14:41:45)
git-committer:
Jason Gross <jgross@mit.edu> (08/08/13 15:51:55)
Message:
Add a ~/.owl/ircchannels file, persist channels

All irc channel subscriptions persist across reconnects.

irc-{part,join} now have a -t flag, which makes the channels not persist
across BarnOwl sessions.

irc-loadchannels loads persistent channels.  It does not unload existing
channels.
File:
1 edited

Legend:

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

    r13ee8f2 rbe43554  
    3939    my $self = bless({}, $class);
    4040    $self->conn($conn);
    41     $self->autoconnect_channels([]);
     41    # TODO(jgross): use // when we move to requiring perl 5.10
     42    $self->autoconnect_channels(defined $args->{autoconnect_channels} ? $args->{autoconnect_channels} : []);
    4243    $self->alias($alias);
    4344    $self->server($host);
     
    412413        $self->{reconnect_timer}->stop;
    413414    }
    414     $self->{reconnect_timer} = 
     415    $self->{reconnect_timer} =
    415416        BarnOwl::Timer->new( {
    416417            name  => 'IRC (' . $self->alias . ') reconnect_timer',
     
    445446            $self->conn->send_msg(join => $c);
    446447        }
    447         $self->autoconnect_channels([]);
    448448    }
    449449    $self->conn->enable_ping(60, sub {
     
    458458    my $backoff = $self->backoff;
    459459
    460     $self->autoconnect_channels([keys(%{$self->{channel_list}})]);
    461460    $self->conn->connect(@{$self->connect_args});
    462461}
Note: See TracChangeset for help on using the changeset viewer.