Removing more return 0's.

This commit is contained in:
Elijah Perrault committed 2011-03-18 14:06:22 -06:00
1 parent 8a8166bdb8
commit ab2d404f20
5 files changed
+21 -20

No files matched your search

+2 -1
View File
@@ -77,6 +77,7 @@ use API::Log qw(alog dbug);
use Parser::Config;
use Parser::Lang;
use Proto::IRC;
use State::IRC;
use Core::IRC;
use Core::IRC::Users;
use Core::Cmd;
@@ -562,7 +563,7 @@ sub socksnd {
return 1;
}
else {
return 0;
return;
}
}
+2 -2
View File
@@ -432,9 +432,9 @@ sub ratelimit_check {
return 1;
}
else {
# Increment their uses and return 0.
# Increment their uses and return false.
$Core::IRC::usercmd{$src{nick}.'@'.$src{host}.'/'.$src{svr}}++;
return 0;
return;
}
}
else {
+9 -9
View File
@@ -21,13 +21,13 @@ sub cmd_modload
# Check for the needed parameters.
if (!defined $argv[0]) {
notice($src->{svr}, $src->{nick}, trans("Not enough parameters").".");
return 0;
return;
}
# Check if the module is already loaded.
if (API::Std::mod_exists($argv[0])) {
notice($src->{svr}, $src->{nick}, "Module \002".$argv[0]."\002 is already loaded.");
return 0;
return;
}
# Go for it!
@@ -41,7 +41,7 @@ sub cmd_modload
else {
# We weren't.
notice($src->{svr}, $src->{nick}, "Module \002".$argv[0]."\002 failed to load.");
return 0;
return;
}
return 1;
@@ -59,13 +59,13 @@ sub cmd_modunload
# Check for the needed parameters.
if (!defined $argv[0]) {
notice($src->{svr}, $src->{nick}, trans("Not enough parameters").".");
return 0;
return;
}
# Check if the module exists.
if (!API::Std::mod_exists($argv[0])) {
notice($src->{svr}, $src->{nick}, "Module \002".$argv[0]."\002 is not loaded.");
return 0;
return;
}
# Go for it!
@@ -79,7 +79,7 @@ sub cmd_modunload
else {
# We weren't.
notice($src->{svr}, $src->{nick}, "Module \002".$argv[0]."\002 failed to unload.");
return 0;
return;
}
return 1;
@@ -97,13 +97,13 @@ sub cmd_modreload
# Check for the needed parameters.
if (!defined $argv[0]) {
notice($src->{svr}, $src->{nick}, trans("Not enough parameters").".");
return 0;
return;
}
# Check if the module exists.
if (!API::Std::mod_exists($argv[0])) {
notice($src->{svr}, $src->{nick}, "Module \002".$argv[0]."\002 is not loaded.");
return 0;
return;
}
# Go for it!
@@ -119,7 +119,7 @@ sub cmd_modreload
else {
# We weren't.
notice($src->{svr}, $src->{nick}, "Module \002".$argv[0]."\002 failed to reload.");
return 0;
return;
}
return 1;
+7 -7
View File
@@ -14,13 +14,13 @@ sub new
# Check to see if the configuration file exists.
if (!-e "$Auto::bin{etc}/$file") {
return 0;
return;
}
# Open, read and close the config.
open(my $FCONF, q{<}, "$Auto::bin{etc}/$file") or return 0;
my @cosfl = <$FCONF> or return 0;
close $FCONF or return 0;
open(my $FCONF, q{<}, "$Auto::bin{etc}/$file") or return;
my @cosfl = <$FCONF> or return;
close $FCONF or return;
# Save it to self variable.
$self->{'config'}->{'path'} = "$Auto::bin{etc}/$file";
@@ -38,9 +38,9 @@ sub parse
my (%rs);
# Open, read and close it.
open(my $FCONF, q{<}, "$file") or return 0;
my @fbuf = <$FCONF> or return 0;
close $FCONF or return 0;
open(my $FCONF, q{<}, "$file") or return;
my @fbuf = <$FCONF> or return;
close $FCONF or return;
# Iterate the file.
foreach my $buff (@fbuf) {
+1 -1
View File
@@ -21,7 +21,7 @@ sub parse
}
# Open, read and close the file.
open(my $FALF, '<', "$Auto::bin{lng}/$lang.alf") or return 0;
open(my $FALF, '<', "$Auto::bin{lng}/$lang.alf") or return;
my @fbuf = <$FALF>;
close $FALF;