]> git.donarmstrong.com Git - infobot.git/commitdiff
* Use message count instead of the per-invocation stuff
authordondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 27 Jun 2006 01:15:34 +0000 (01:15 +0000)
committerdondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 27 Jun 2006 01:15:34 +0000 (01:15 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/don/dpkg@1296 c11ca15a-4712-0410-83d8-924469b57eb5

src/CommandStubs.pl

index 93fc65302d45b8c2da0ea345154d09b2cd093882..ef2e0146875b5500ecccb784668c4c63544d3f67 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);