Removing return 0's as it's improper.

This commit is contained in:
Elijah Perrault committed 2011-03-18 14:05:10 -06:00
1 parent 374b04fddc
commit 8a8166bdb8
9 files changed
+32 -32

No files matched your search

+7 -7
View File
@@ -11,9 +11,9 @@ use API::Log qw(alog);
sub _init
{
# Add a hook for when we join a channel.
hook_add('on_connect', 'Oper.onconnect', \&M::Oper::on_connect) or return 0;
hook_add('on_connect', 'Oper.onconnect', \&M::Oper::on_connect) or return;
# Add a hook for when we get numeric 491 (ERR_NOOPERHOST)
rchook_add('491', 'Oper.on381', \&M::Oper::on_num491) or return 0;
rchook_add('491', 'Oper.on381', \&M::Oper::on_num491) or return;
return 1;
}
@@ -21,10 +21,10 @@ sub _init
sub _void
{
# Delete the hooks.
hook_del('on_connect', 'Oper.onconnect') or return 0;
rchook_del('381', 'Oper.on381') or return 0;
rchook_del('313', 'Oper.on313') or return 0;
rchook_del('491', 'Oper.on491') or return 0;
hook_del('on_connect', 'Oper.onconnect') or return;
rchook_del('381', 'Oper.on381') or return;
rchook_del('313', 'Oper.on313') or return;
rchook_del('491', 'Oper.on491') or return;
return 1;
}
@@ -55,7 +55,7 @@ sub on_num491 {
sub is_opered {
my ($svr) = @_;
# Auto is not opered.
return 0 if $Proto::IRC::botinfo{$svr}{modes} !~ m/o/xsm;
return if $Proto::IRC::botinfo{$svr}{modes} !~ m/o/xsm;
# Auto is opered.
return 1 if $Proto::IRC::botinfo{$svr}{modes} =~ m/o/xsm;
return;