]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/Factoids.pl
factstats author
[infobot.git] / src / Modules / Factoids.pl
index 729ec8e77a7969e2b54a16995a9e2fe411615ebb..7a9a178ca24f68aa6123c37e0dea9b629829d0bb 100644 (file)
@@ -136,14 +136,14 @@ sub CmdFactStats {
     my ($type) = @_;
 
     if ($type =~ /^author$/i) {
-       my @array = &sqlSelectColArray("factoids",
+       my %hash = &sqlSelectColHash("factoids",
                "factoid_key,created_by", { },
                "created_by IS NOT NULL"
        );
        my %author;
 
-       foreach (@array) {
-           my $thisnuh = $hash{$_};
+       foreach my $factoid (keys %hash) {
+           my $thisnuh = $hash{$factoid};
 
            $thisnuh =~ /^(\S+)!\S+@\S+$/;
            $author{lc $1}++;