]> git.donarmstrong.com Git - infobot.git/commitdiff
maxListReply* now by channel
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 18 Feb 2005 00:28:08 +0000 (00:28 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 18 Feb 2005 00:28:08 +0000 (00:28 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1134 c11ca15a-4712-0410-83d8-924469b57eb5

files/sample/blootbot.chan
files/sample/blootbot.config
src/Misc.pl
src/Modules/Factoids.pl
src/Modules/Search.pl

index e6220b78870c156f7dc13933cc347ac3498a5480..4125f208ab1b49a4d1873f54f65806646766a47f 100644 (file)
@@ -59,6 +59,8 @@ _default
     +lart
     +limitcheck
     +log
+    maxListReplyCount 15
+    maxListReplyLength 400
     +md5
     +nickometer
     +page
index 2dde0259b57e50eedc9ab71efab03b92f5b80a79..eb38c8a1acaf3228f442f9f7a8e89fec3d64e0c3 100644 (file)
@@ -143,14 +143,6 @@ set talkMethod             DEFAULT
 #      "+" before bot commands overrides this option temporarily.
 ###set minLengthBeforePrivate 192
 
-# [int] maximum length of reply for Extras function before popping list to
-#      reduce number of elements.
-set maxListReplyLength 400
-
-# [int] maximum number of elements in list allowed for Extras function
-#      before popping elements to reduce total count.
-set maxListReplyCount  15
-
 # [0/1] allow people outside any channels the bot is on to use the bot
 #      for factoids and commands.
 set disallowOutsiders  1
index bef0f917634d5ad1ed340c07f01522524b6e4f5a..6cb2e7b1fdbf36fcb8b9a7231f800c3802940a08 100644 (file)
@@ -117,8 +117,8 @@ sub timedelta {
 sub formListReply {
     my($rand, $prefix, @list) = @_;
     my $total  = scalar @list;
-    my $maxshow = $param{'maxListReplyCount'}  || 10;
-    my $maxlen = $param{'maxListReplyLength'} || 400;
+    my $maxshow = &getChanConfDefault('maxListReplyCount', 15);
+    my $maxlen = &getChanConfDefault('maxListReplyLength', 400);
     my $reply;
 
     # remove irc overhead
index 50a98ea3e034c55628a69781a6491643152d6d69..56639afcde8de975ebe9195505b1ac9cb725baf5 100644 (file)
@@ -739,7 +739,7 @@ sub CmdFactStats {
 
 sub CmdListAuth {
     my ($query) = @_;
-    my $maxshow = $::param{'maxListReplyCount'} || 10;
+    my $maxshow = &::getChanConfDefault('maxListReplyCount', 15);
     my @list = &searchTable("factoids","factoid_key", "created_by", "^$query!");
     @list=grep(!/\#DEL\#$/,@list) if (scalar(@list) > $maxshow);
 
index 01a5ff0d9a539797393d6bffe4218db5cfa94153..9f3ab772c71ce65dcabca7b0f5d35a21a52fa34d 100644 (file)
@@ -13,7 +13,7 @@ sub Search {
     my ($type, $str) = @_;
     my $start_time = &::timeget();
     my @list;
-    my $maxshow = $::param{'maxListReplyCount'} || 10;
+    my $maxshow = &::getChanConfDefault('maxListReplyCount', 15);
 
     $type =~ s/s$//;   # nice work-around.