]> git.donarmstrong.com Git - infobot.git/commitdiff
* Merge r1296 from Don's branch - Use message count instead of the per-invocation...
authordjmcgrath <djmcgrath@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 19 Oct 2007 12:19:40 +0000 (12:19 +0000)
committerdjmcgrath <djmcgrath@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 19 Oct 2007 12:19:40 +0000 (12:19 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1578 c11ca15a-4712-0410-83d8-924469b57eb5

src/CommandStubs.pl

index 580a42eabb5f0c2a59c4c4ccd8be3141ff2862c8..ed89824cd814e11fa5f4861d93fd36f2395b053c 100644 (file)
@@ -331,7 +331,7 @@ sub seen {
     &seenFlush();      # very evil hack. oh well, better safe than sorry.
 
     # TODO: convert to &sqlSelectRowHash();
-    my $select = 'nick,time,channel,host,message';
+    my $select = 'nick,time,channel,host,message,messagecount';
     if ($person eq 'random') {
        @seen = &randKey('seen', $select);
     } else {
@@ -363,7 +363,7 @@ sub seen {
 
        if (&IsChanConf('seenStats') > 0) {
            my $i;
-           $i = $userstats{lc $seen[0]}{'Count'};
+           $i = $seen[6] || $userstats{lc $seen[0]}{'Count'};
            $reply .= ". Has said a total of \002$i\002 messages" if (defined $i);
            $i = $userstats{lc $seen[0]}{'Time'};
            $reply .= '. Is idling for '.&Time2String(time() - $i) if (defined $i);