- if ($message =~ /^statu?s$/i) {
- my $startString = scalar(gmtime $^T);
- my $upString = &Time2String(time() - $^T);
- my ($puser,$psystem,$cuser,$csystem) = times;
- my $factoids = &countKeys("factoids");
- my $forks = 0;
- foreach (keys %forked) {
- $forks += scalar keys %{ $forked{$_} };
- }
- $forks /= 2;
- $count{'Commands'} = 0;
- foreach (keys %cmdstats) {
- $count{'Commands'} += $cmdstats{$_};
- }
-
- &performStrictReply(
- "Since $startString, there have been".
- " \002$count{'Update'}\002 ".
- &fixPlural("modification", $count{'Update'}).
- ", \002$count{'Question'}\002 ".
- &fixPlural("question",$count{'Question'}).
- ", \002$count{'Dunno'}\002 ".
- &fixPlural("dunno",$count{'Dunno'}).
- ", \002$count{'Moron'}\002 ".
- &fixPlural("moron",$count{'Moron'}).
- " and \002$count{'Commands'}\002 ".
- &fixPlural("command",$count{'Commands'}).
- ". I have been awake for $upString this session, and ".
- "currently reference \002$factoids\002 factoids. ".
- "I'm using about \002$memusage\002 ".
- "kB of memory. With \002$forks\002 active ".
- &fixPlural("fork",$forks).
- ". Process time user/system $puser/$psystem child $cuser/$csystem"
- );
-
- return;
-
- my %hash = &sqlSelectColHash("stats", "nick,counter",
- { type => "cmdstats" }, 1);
-# ORDER won't be retained in a hash
-# " ORDER BY counter DESC", 1);
-
-if (0) {
- foreach (keys %hash) {
- my $i = $_;
- foreach (keys %{ $hash{$i} }) {
- &DEBUG("cmdstats: $hash{$i}{$_} = $_");
- }
- }
- &DEBUG("end of cmdstats.");
-}
-
- return;
+ if ( $message =~ /^statu?s$/i ) {
+ my $startString = scalar( gmtime $^T );
+ my $upString = &Time2String( time() - $^T );
+ my ( $puser, $psystem, $cuser, $csystem ) = times;
+ my $factoids = &countKeys('factoids');
+ my $forks = 0;
+ foreach ( keys %forked ) {
+ $forks += scalar keys %{ $forked{$_} };
+ }
+ $forks /= 2;
+ $count{'Commands'} = 0;
+ foreach ( keys %cmdstats ) {
+ $count{'Commands'} += $cmdstats{$_};
+ }
+
+ &performStrictReply( "Since $startString, there have been"
+ . " \002$count{'Update'}\002 "
+ . &fixPlural( 'modification', $count{'Update'} )
+ . ", \002$count{'Question'}\002 "
+ . &fixPlural( 'question', $count{'Question'} )
+ . ", \002$count{'Dunno'}\002 "
+ . &fixPlural( 'dunno', $count{'Dunno'} )
+ . ", \002$count{'Moron'}\002 "
+ . &fixPlural( 'moron', $count{'Moron'} )
+ . " and \002$count{'Commands'}\002 "
+ . &fixPlural( 'command', $count{'Commands'} )
+ . ". I have been awake for $upString this session, and "
+ . "currently reference \002$factoids\002 factoids. "
+ . "I'm using about \002$memusage\002 "
+ . "kB of memory. With \002$forks\002 active "
+ . &fixPlural( 'fork', $forks )
+ . ". Process time user/system $puser/$psystem child $cuser/$csystem"
+ );
+
+ return;