Help => 'nslookup', Identifier => 'allowDNS',
Forker => "NULL", ) );
&addCmdHook("main", 'tell|explain', ('CODEREF' => 'tell',
- Help => 'tell', Identifier => 'allowTelling', ) );
+ Help => 'tell', Identifier => 'allowTelling',
+ Cmdstats => 'Tell') );
&addCmdHook("main", 'news', ('CODEREF' => 'News::Parse',
- Module => 'news', Identifier => 'news') );
+ Module => 'news', ) );
+# Module => 'news', Identifier => 'news') );
&status("CMD: loaded ".scalar(keys %hooks_main)." MAIN command hooks.");
&ircCheck();
next;
}
- push(@array, "$_ (".scalar(keys %{$channels{$_}{''}}).")");
+ push(@array, "$_ (".scalar(keys %{ $channels{$_}{''} }).")");
}
&pSReply($reply.": ".join(' ', @array));
### total user count.
foreach $chan (keys %channels) {
- $tucount += scalar(keys %{$channels{$chan}{''}});
+ $tucount += scalar(keys %{ $channels{$chan}{''} });
}
### unique user count.
# Step 1:
my @array;
- foreach (sort keys %{$chanstats{$chan}}) {
+ foreach (sort keys %{ $chanstats{$chan} }) {
my $int = $chanstats{$chan}{$_};
next unless ($int);
- $chanstats{$chan}{'Part'};
if ($delta_stats) {
- my $total = scalar(keys %{$channels{$chan}{''}});
+ my $total = scalar(keys %{ $channels{$chan}{''} });
&status("chaninfo: join ~= signoff + part (drift of $delta_stats < $total).");
if ($delta_stats > $total) {
undef @array;
my $type;
foreach ("v","o","") {
- my $int = scalar(keys %{$channels{$chan}{$_}});
+ my $int = scalar(keys %{ $channels{$chan}{$_} });
next unless ($int);
$type = "Voice" if ($_ eq "v");
my %countstats;
foreach (keys %cmdstats) {
- $countstats{$cmdstats{$_}}{$_} = 1;
+ $countstats{ $cmdstats{$_} }{$_} = 1;
}
foreach (sort {$b <=> $a} keys %countstats) {
my $int = $_;
next unless ($int);
- foreach (keys %{$countstats{$int}}) {
+ foreach (keys %{ $countstats{$int} }) {
push(@array, "\002$int\002 of $_");
}
}
my $connectivity = 100 * ($total_time - $ircstats{'OffTime'}) /
$total_time;
- my $p = sprintf("%.02f", $connectivity);
+ my $p = sprintf("%.03f", $connectivity);
$p =~ s/(\.\d*)0+$/$1/;
if ($p =~ s/\.0$//) {
- &DEBUG("p sar not working properly :(");
+ # this should not happen... but why...
} else {
$p =~ s/\.$//
}
- &DEBUG("connectivity => $p %");
-
if ($total_time != (time() - $ircstats{'ConnectTime'}) ) {
my $tt_format = &Time2String($total_time);
&DEBUG("tt_format => $tt_format");
} else {
$reply = "Currently I'm hooked up to $ircstats{'Server'} but only".
" for $format_time. ".
- "I had to reconnect \002$count\002 times.";
+ "I had to reconnect \002$count\002 times.".
+ " Connectivity: $p %";
}
### REASON.
my $reason = $ircstats{'DisconnectReason'};
if (defined $reason) {
- $reply .= " I was last disconnected for '$reason'.";
+ $reply .= ". I was last disconnected for '$reason'.";
}
&pSReply($reply);