]> git.donarmstrong.com Git - infobot.git/commitdiff
- removed '' from returns
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 17 Feb 2001 13:41:35 +0000 (13:41 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 17 Feb 2001 13:41:35 +0000 (13:41 +0000)
- preliminary stats for on/off-line time

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@402 c11ca15a-4712-0410-83d8-924469b57eb5

src/UserExtra.pl

index d854effc3189208f641e29c1869922da611a2407..075e0c2703b8d4f19e2432efc69da1ee614fb4d8 100644 (file)
@@ -407,7 +407,7 @@ sub DNS {
 sub userCommands {
     # conversion: ascii.
     if ($message =~ /^(asci*|chr) (\d+)$/) {
-       return '' unless (&IsParam("allowConv"));
+       return unless (&IsParam("allowConv"));
 
        $arg    = $2;
        $result = chr($arg);
@@ -420,7 +420,7 @@ sub userCommands {
 
     # conversion: ord.
     if ($message =~ /^ord (.)$/) {
-       return '' unless (&IsParam("allowConv"));
+       return unless (&IsParam("allowConv"));
 
        $arg = $1;
        if (ord($arg) < 32) {
@@ -438,7 +438,7 @@ sub userCommands {
 
     # hex.
     if ($message =~ /^hex(\s+(.*))?$/i) {
-       return '' unless (&IsParam("allowConv"));
+       return unless (&IsParam("allowConv"));
        my $arg = $2;
 
        if (!defined $arg) {
@@ -605,8 +605,12 @@ sub userCommands {
     if ($message =~ /^ircstats$/i) {
        my $count       = $ircstats{'ConnectCount'};
        my $format_time = &Time2String(time() - $ircstats{'ConnectTime'});
+       my $total_time  = time() - $ircstats{'ConnectTime'} + $ircstats{'TotalTime'};
        my $reply;
 
+       &DEBUG("ircstats: total_time => $total_time.");
+       &DEBUG("ircstats: offtime => $ircstats{'OffTime'}");
+
        foreach (keys %ircstats) {
            &DEBUG("ircstats: $_ => '$ircstats{$_}'.");
        }