diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index cd6bb296..03be091d 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -1077,8 +1077,8 @@ sub count { my $i = 0; my $total = 0; - if(not defined $arguments) { - return "Usage: count "; + if (not length $arguments) { + return "Usage: count "; } $arguments = ".*" if($arguments =~ /^factoids$/); @@ -1088,7 +1088,7 @@ sub count { foreach my $command (keys %{ $factoids->{$channel} }) { next if $factoids->{$channel}->{$command}->{type} ne 'text'; $total++; - if($factoids->{$channel}->{$command}->{owner} =~ /\Q$arguments\E/i) { + if($factoids->{$channel}->{$command}->{owner} =~ /^\Q$arguments\E$/i) { $i++; } }