X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Dispatcher.pm;h=a96c32e164843fda69c1998d5b18abad2f89fa4f;hb=a4667cce6415476312d6932f92f89fb28101ab88;hp=ccfeb1371329689a2608b810101bc7dd7c2cbc11;hpb=b87b6e87c3959096739e54bdf95c23d9e8212145;p=NDIRC.git diff --git a/Dispatcher.pm b/Dispatcher.pm index ccfeb13..a96c32e 100644 --- a/Dispatcher.pm +++ b/Dispatcher.pm @@ -54,7 +54,7 @@ sub load { warn "couldn't do $file: $!" if $!; warn "couldn't run $file" unless $return; }else { - print "Loading $class\n"; + say "\nLoading $class"; $self->load_class($class); } @@ -67,8 +67,8 @@ sub load_class { my @subs = eval "$class->meta->get_method_list"; for my $c (@subs){ my $attr = eval "$class->meta->get_method('$c')->attributes"; - if ($attr){ - print "Command: $c"; + if (@$attr){ + print "Command: $c "; my %c = (channels => ['all']); my @aliases; for (@{$attr}){ @@ -146,6 +146,7 @@ sub run_command { } } } + return 1; } 1;