X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FCommandStubs.pl;h=c31129e5924edab61fbc5e2f6c4857a2116f8728;hb=0e3df27228cf790fad3c3d9b6496db63c3ece37e;hp=3b732d63cf2508a3b82375fe8a1bc56ec5625b27;hpb=a8b8b641d67103ac84e5d52c4ce8e1072aee4a43;p=infobot.git diff --git a/src/CommandStubs.pl b/src/CommandStubs.pl index 3b732d6..c31129e 100644 --- a/src/CommandStubs.pl +++ b/src/CommandStubs.pl @@ -1,5 +1,6 @@ # # User Command Extension Stubs +# WARN: this file does not reload on HUP. # if (&IsParam("useStrict")) { use strict; } @@ -102,9 +103,9 @@ sub parseCmdHook { $hash{'Identifier'} .= "-" if ($hash{'Forker'} eq "NULL"); if (exists $hash{'ArrayArgs'}) { - &Forker($hash{'Identifier'}, sub { \&{$hash{'CODEREF'}}(@args) } ); + &Forker($hash{'Identifier'}, sub { \&{ $hash{'CODEREF'} }(@args) } ); } else { - &Forker($hash{'Identifier'}, sub { \&{$hash{'CODEREF'}}($flatarg) } ); + &Forker($hash{'Identifier'}, sub { \&{ $hash{'CODEREF'} }($flatarg) } ); } } else { @@ -123,9 +124,9 @@ sub parseCmdHook { } if (exists $hash{'ArrayArgs'}) { - &{$hash{'CODEREF'}}(@args); + &{ $hash{'CODEREF'} }(@args); } else { - &{$hash{'CODEREF'}}($flatarg); + &{ $hash{'CODEREF'} }($flatarg); } } @@ -146,7 +147,7 @@ sub parseCmdHook { ### ### START ADDING HOOKS. ### -&addCmdHook("extra", 'd?bugs', ('CODEREF' => 'debianBugs', +&addCmdHook("extra", 'd?bugs', ('CODEREF' => 'DBugs::Parse', 'Forker' => 1, 'Identifier' => 'debianExtra', 'Cmdstats' => 'Debian Bugs') ); &addCmdHook("extra", 'dauthor', ('CODEREF' => 'Debian::searchAuthor', @@ -331,7 +332,7 @@ sub Modules { ### TODO: compact with map? my @list; foreach (sort {$b <=> $a} keys %nickometer) { - my $str = join(", ", sort keys %{$nickometer{$_}}); + my $str = join(", ", sort keys %{ $nickometer{$_} }); push(@list, "$str ($_%)"); } @@ -556,7 +557,7 @@ sub cookie { # lets find that secret cookie. my $target = ($msgType ne 'public') ? $who : $talkchannel; - my $cookiemsg = &getRandom(keys %{$lang{'cookie'}}); + my $cookiemsg = &getRandom(keys %{ $lang{'cookie'} }); my ($key,$value); ### WILL CHEW TONS OF MEM.