]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/Search.pl
take a few more things literally
[infobot.git] / src / Modules / Search.pl
index 01a5ff0d9a539797393d6bffe4218db5cfa94153..5f4108abe3f0a733c74399bfa0062c7ea79e1813 100644 (file)
@@ -13,16 +13,16 @@ sub Search {
     my ($type, $str) = @_;
     my $start_time = &::timeget();
     my @list;
-    my $maxshow = $::param{'maxListReplyCount'} || 10;
+    my $maxshow = &::getChanConfDefault('maxListReplyCount', 15, $::chan);
 
     $type =~ s/s$//;   # nice work-around.
 
-    if ($type eq "value") {
+    if ($type eq 'value') {
        # search by value.
-       @list = &::searchTable("factoids", "factoid_key", "factoid_value", $str);
+       @list = &::searchTable('factoids', 'factoid_key', 'factoid_value', $str);
     } else {
        # search by key.
-       @list = &::searchTable("factoids", "factoid_key", "factoid_key", $str);
+       @list = &::searchTable('factoids', 'factoid_key', 'factoid_key', $str);
     }
 
     @list=grep(!/\#DEL\#$/,@list) if (scalar(@list) > $maxshow);