]> git.donarmstrong.com Git - infobot.git/blobdiff - src/UserExtra.pl
ws
[infobot.git] / src / UserExtra.pl
index 0292db704c167420d2bd8239847cc61a94a52e22..ada60ce8113155e9c07a0e378c67793df0f403a1 100644 (file)
@@ -225,7 +225,7 @@ sub factstats {
 sub karma {
     my $target = lc( shift || $who );
     my $karma  = &sqlSelect("stats", "counter",
-       { nick => $target, type => "karma" }) || 0; 
+       { nick => $target, type => "karma" }) || 0;
 
     if ($karma != 0) {
        &pSReply("$target has karma of $karma");
@@ -330,7 +330,7 @@ sub tell {
     $target    = $talkchannel  if ($target =~ /^us$/i);
     $target    = $who          if ($target =~ /^(me|myself)$/i);
 
-    &status("tell: target = $target, query = $query");  
+    &status("tell: target = $target, query = $query");
 
     # "intrusive".
 #    if ($target !~ /^$mask{chan}$/ and !&IsNickInAnyChan($target)) {
@@ -416,7 +416,7 @@ sub DNS {
            $result = $match." is ".$x unless ($x =~ /^\s*$/);
        } else {
            $result = "I can't seem to find that address in DNS";
-        }
+       }
 
     } else {
 
@@ -787,7 +787,7 @@ sub userCommands {
        }
 
        &pSReply($reply);
-               
+
        return;
     }
 
@@ -796,7 +796,11 @@ 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{$_} };
+       }
+       $forks /= 2;
        $count{'Commands'}      = 0;
        foreach (keys %cmdstats) {
            $count{'Commands'} += $cmdstats{$_};
@@ -817,7 +821,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;