Ignore:
Timestamp:
Jan 16, 2008, 10:03:00 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
eebef19
Parents:
f2d72128
Message:
Rewrite ::Connection to not subclass Net::IRC::Connection to avoid
stupid namespace conflicts
File:
1 edited

Legend:

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

    r56e72d5 rba2ca66  
    6565sub shutdown {
    6666    for my $conn (values %ircnets) {
    67         $conn->disconnect();
     67        $conn->conn->disconnect();
    6868    }
    6969}
     
    169169    my $cmd = shift;
    170170    my $conn = get_connection(\@_);
    171     $conn->disconnect;
     171    $conn->conn->disconnect;
    172172    delete $ircnets{$conn->alias};
    173173}
     
    191191    # Strip whitespace. In the future -- send one message/line?
    192192    $body =~ tr/\n\r/  /;
    193     $conn->privmsg($to, $body);
     193    $conn->conn->privmsg($to, $body);
    194194    my $msg = BarnOwl::Message->new(
    195195        type        => 'IRC',
     
    214214    $channels{$chan} ||= [];
    215215    push @{$channels{$chan}}, $conn;
    216     $conn->join($chan);
     216    $conn->conn->join($chan);
    217217}
    218218
     
    222222    my $chan = get_channel(\@_) || die("Usage: $cmd <channel>\n");
    223223    $channels{$chan} = [grep {$_ ne $conn} @{$channels{$chan} || []}];
    224     $conn->part($chan);
     224    $conn->conn->part($chan);
    225225}
    226226
     
    229229    my $conn = get_connection(\@_);
    230230    my $nick = shift or die("Usage: $cmd <new nick>\n");
    231     $conn->nick($nick);
     231    $conn->conn->nick($nick);
    232232}
    233233
     
    236236    my $conn = get_connection(\@_);
    237237    my $chan = get_channel(\@_) || die("Usage: $cmd <channel>\n");
    238     $conn->names($chan);
     238    $conn->conn->names($chan);
    239239}
    240240
     
    243243    my $conn = get_connection(\@_);
    244244    my $who = shift || die("Usage: $cmd <user>\n");
    245     $conn->whois($who);
     245    $conn->conn->whois($who);
    246246}
    247247
     
    249249    my $cmd = shift;
    250250    my $conn = get_connection(\@_);
    251     $conn->motd;
     251    $conn->conn->motd;
    252252}
    253253
Note: See TracChangeset for help on using the changeset viewer.