Skip to content

Commit

Permalink
Corrected some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
bingos committed Feb 15, 2010
1 parent 31919f8 commit d24880b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 33 deletions.
4 changes: 1 addition & 3 deletions MANIFEST
Expand Up @@ -2,15 +2,13 @@ Changes
examples/LogServ-Hyb.pl
examples/LogServ-P10.pl
examples/README
git.core
inc/Module/Install.pm
inc/Module/Install/AutoLicense.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/GithubMeta.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/MakeMaker.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
Expand All @@ -23,7 +21,7 @@ lib/POE/Filter/IRC/Hybrid.pm
lib/POE/Filter/IRC/P10.pm
LICENSE
Makefile.PL
MANIFEST
MANIFEST This list of files
META.yml
README
t/01_p10.t
Expand Down
2 changes: 1 addition & 1 deletion lib/POE/Component/IRC/Service.pm
Expand Up @@ -16,7 +16,7 @@ use POE::Component::IRC::Service::Hybrid;
use Carp;
use vars qw($VERSION);

$VERSION = '0.994';
$VERSION = '0.996';

sub new {
my ($package,$alias,$ircdtype) = splice @_, 0, 3;
Expand Down
12 changes: 7 additions & 5 deletions lib/POE/Component/IRC/Service/Hybrid.pm
Expand Up @@ -18,7 +18,7 @@ use Socket;
use Sys::Hostname;
use vars qw($VERSION);

$VERSION = '0.9';
$VERSION = '0.996';

use constant PCI_REFCOUNT_TAG => "P::C::I registered";

Expand Down Expand Up @@ -1028,8 +1028,9 @@ sub _channel_mode {
my (@modes) = retOpflags($modes);
my ($currentmode) = $self->{channels}->{$channel}->{Mode};
foreach (@modes) {
my ($argument) = shift(@args) if (/\+[bkloveIh]/);
my ($argument) = shift(@args) if (/-[boveIh]/);
my $argument;
$argument = shift(@args) if (/\+[bkloveIh]/);
$argument = shift(@args) if (/-[boveIh]/);
SWITCH: {
if (/[eI]/) {
last SWITCH;
Expand Down Expand Up @@ -1335,8 +1336,9 @@ Well, OK, there's only actually one, so it's more like "METHOD".
=item new
Takes one argument: a name (kernel alias) which this new connection
will be known by. B<WARNING:> This method, for all that it's named
Takes two arguments: a name (kernel alias) which this new connection
will be known by, the second argument is a hashref of options see C<connect> for more
details. B<WARNING:> This method, for all that it's named
"new" and called in an OO fashion, doesn't actually return an
object. It returns a true or false value which indicates if the new
session was created or not. If it returns false, check $! for the
Expand Down
43 changes: 22 additions & 21 deletions lib/POE/Component/IRC/Service/P10.pm
Expand Up @@ -19,7 +19,7 @@ use Sys::Hostname;
use Time::HiRes qw (gettimeofday);
use vars qw($VERSION);

$VERSION = '0.9';
$VERSION = '0.996';

my %cmd2token = ('ACCOUNT' => 'AC', 'ADMIN' => 'AD', 'ASLL' => 'LL', 'AWAY' => 'A', 'BURST' => 'B', 'CLEARMODE' => 'CM', 'CLOSE' => 'CLOSE', 'CNOTICE' => 'CN', 'CONNECT' => 'CO', 'CPRIVMSG' => 'CP', 'CREATE' => 'C', 'DESTRUCT' => 'DE', 'DESYNCH' => 'DS', 'DIE' => 'DIE', 'DNS' => 'DNS', 'END_OF_BURST' => 'EB', 'EOB_ACK' => 'EA', 'ERROR' => 'Y', 'GET' => 'GET', 'GLINE' => 'GL', 'HASH' => 'HASH', 'HELP' => 'HELP', 'INFO' => 'F', 'INVITE' => 'I', 'ISON' => 'ISON', 'JOIN' => 'J', 'JUPE' => 'JU', 'KICK' => 'K', 'KILL' => 'D', 'LINKS' => 'LI', 'LIST' => 'LIST', 'LUSERS' => 'LU', 'MAP' => 'MAP', 'MODE' => 'M', 'MOTD' => 'MO', 'NAMES' => 'E', 'NICK' => 'N', 'NOTICE' => 'O', 'OPER' => 'OPER', 'OPMODE' => 'OM', 'PART' => 'L', 'PASS' => 'PA', 'PING' => 'G', 'PONG' => 'Z', 'POST' => 'POST', 'PRIVMSG' => 'P', 'PRIVS' => 'PRIVS', 'PROTO' => 'PROTO', 'QUIT' => 'Q', 'REHASH' => 'REHASH', 'RESET' => 'RESET', 'RESTART' => 'RESTART', 'RPING' => 'RI', 'RPONG' => 'RO', 'SERVER' => 'S', 'SET' => 'SET', 'SETTIME' => 'SE', 'SILENCE' => 'U', 'SQUIT' => 'SQ', 'STATS' => 'R', 'TIME' => 'TI', 'TOPIC' => 'T', 'TRACE' => 'TR', 'UPING' => 'UP', 'USER' => 'USER', 'USERHOST' => 'USERHOST', 'USERIP' => 'USERIP', 'VERSION' => 'V', 'WALLCHOPS' => 'WC', 'WALLOPS' => 'WA', 'WALLUSERS' => 'WU', 'WALLVOICES' => 'WV', 'WHO' => 'H', 'WHOIS' => 'W', 'WHOWAS' => 'X');

Expand Down Expand Up @@ -770,24 +770,6 @@ sub kick {
$kernel->yield('sl_client', "$numeric K $chan $nick" );
}

# Join a channel. Do a CREATE or JOIN appropriately
sub join {
my ($kernel,$heap,$numeric,$channel,$modes) = @_[KERNEL,HEAP,ARG0,ARG1,ARG2];

unless (defined $numeric and defined $channel) {
die "The POE::Component::IRC event \"join\" requires at least two arguments";
}

my ($timestamp) = time();
if ( $heap->{State}->channel_exists($channel) ) {
# Join channel
$kernel->yield( 'sl_client' => "$numeric J $channel $timestamp" );
} else {
# Create channel
$kernel->yield( 'sl_client' => "$numeric C $channel $timestamp" );
}
}

# The handler for all IRC commands that take no arguments.
sub noargs {
my ($kernel, $state, $arg) = @_[KERNEL, STATE, ARG0];
Expand Down Expand Up @@ -1383,8 +1365,9 @@ sub _channel_mode {
my (@modes) = retOpflags($modes);
my ($currentmode) = $self->{channels}->{$channel}->{Mode};
foreach (@modes) {
my ($argument) = shift(@args) if (/\+[ovbkl]/);
my ($argument) = shift(@args) if (/-[ovb]/);
my $argument;
$argument = shift(@args) if (/\+[ovbkl]/);
$argument = shift(@args) if (/-[ovb]/);
SWITCH: {
if (/b/) {
$self->_channel_ban($channel,$_,$argument,$who);
Expand Down Expand Up @@ -1907,6 +1890,24 @@ sub base64_to_decimal {
}
}

# Join a channel. Do a CREATE or JOIN appropriately
sub join {
my ($kernel,$heap,$numeric,$channel,$modes) = @_[KERNEL,HEAP,ARG0,ARG1,ARG2];

unless (defined $numeric and defined $channel) {
die "The POE::Component::IRC event \"join\" requires at least two arguments";
}

my ($timestamp) = time();
if ( $heap->{State}->channel_exists($channel) ) {
# Join channel
$kernel->yield( 'sl_client' => "$numeric J $channel $timestamp" );
} else {
# Create channel
$kernel->yield( 'sl_client' => "$numeric C $channel $timestamp" );
}
}

1;
__END__
Expand Down
2 changes: 1 addition & 1 deletion lib/POE/Filter/IRC/Hybrid.pm
Expand Up @@ -13,7 +13,7 @@ use strict;
use Carp;
use vars qw($VERSION);

$VERSION = '0.9';
$VERSION = '0.996';

# Create a new, empty POE::Filter::IRC object.
sub new {
Expand Down
2 changes: 1 addition & 1 deletion lib/POE/Filter/IRC/P10.pm
Expand Up @@ -14,7 +14,7 @@ use strict;
use Carp;
use vars qw($VERSION);

$VERSION = '0.9';
$VERSION = '0.996';

# Create a new, empty POE::Filter::IRC object.
sub new {
Expand Down
2 changes: 1 addition & 1 deletion t/01_p10.t
Expand Up @@ -97,6 +97,6 @@ sub on_create {

if ( $who eq $heap->{BotNumeric} ) {
$tests[1] = "ok 3";
$kernel->yield ( squit );
$kernel->yield ( 'squit' );
}
}

0 comments on commit d24880b

Please sign in to comment.