X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FUserExtra.pl;h=ada60ce8113155e9c07a0e378c67793df0f403a1;hb=f7cae48a17d6decd0a9bd997188271daa0a885b1;hp=0292db704c167420d2bd8239847cc61a94a52e22;hpb=021e48e3ae3ac2aeeebf1662e4ff3a41a750f0b7;p=infobot.git diff --git a/src/UserExtra.pl b/src/UserExtra.pl index 0292db7..ada60ce 100644 --- a/src/UserExtra.pl +++ b/src/UserExtra.pl @@ -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;