From: timriker Date: Mon, 27 Oct 2003 20:06:05 +0000 (+0000) Subject: current fork count X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=151e019e291c170d462828e664e9cc995ae1f906;p=infobot.git current fork count git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@862 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/UserExtra.pl b/src/UserExtra.pl index 0292db7..f4155db 100644 --- a/src/UserExtra.pl +++ b/src/UserExtra.pl @@ -787,7 +787,7 @@ sub userCommands { } &pSReply($reply); - + return; } @@ -796,7 +796,10 @@ sub userCommands { my $startString = scalar(gmtime $^T); my $upString = &Time2String(time() - $^T); my $factoids = &countKeys("factoids"); - + my $forks = 0; + foreach (keys %forked) { + $forks += scalar keys %{ $forked{$_} }; + } $count{'Commands'} = 0; foreach (keys %cmdstats) { $count{'Commands'} += $cmdstats{$_}; @@ -817,7 +820,9 @@ sub userCommands { ". 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." + "kB of memory. With \002$forks\002 active ". + &fixPlural("fork",$forks). + "." ); return;