Changeset 56e72d5 for perl


Ignore:
Timestamp:
Jan 13, 2008, 6:08:14 PM (13 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:
1fd5041b
Parents:
05f0061
Message:
Kill a uninitialized warning
File:
1 edited

Legend:

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

    rfe8cad8 r56e72d5  
    104104    BarnOwl::new_command('irc-names'      => \&cmd_names);
    105105    BarnOwl::new_command('irc-whois'      => \&cmd_whois);
     106    BarnOwl::new_command('irc-motd'       => \&cmd_motd);
    106107}
    107108
     
    245246}
    246247
     248sub cmd_motd {
     249    my $cmd = shift;
     250    my $conn = get_connection(\@_);
     251    $conn->motd;
     252}
     253
    247254################################################################################
    248255########################### Utilities/Helpers ##################################
     
    256263    }
    257264    my $channel = $args->[-1];
    258     if ($channel =~ /^#/ and $channels{$channel} and @{$channels{$channel}} == 1) {
     265    if (defined($channel) && $channel =~ /^#/
     266        and $channels{$channel} and @{$channels{$channel}} == 1) {
    259267        return $channels{$channel}[0];
    260268    }
Note: See TracChangeset for help on using the changeset viewer.