From d801b40749049f6833deb3b5d30188ce7b61a1b5 Mon Sep 17 00:00:00 2001 From: dms Date: Mon, 5 Feb 2001 16:00:57 +0000 Subject: [PATCH] verstats was using dynamic chan var... git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@345 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/CommandStubs.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CommandStubs.pl b/src/CommandStubs.pl index 6582de2..c9a19f0 100644 --- a/src/CommandStubs.pl +++ b/src/CommandStubs.pl @@ -674,9 +674,14 @@ sub do_verstats { &msg($who, "Sending CTCP VERSION..."); $conn->ctcp("VERSION", $chan); +# $cache{verstats} = $chan; + $conn->schedule(60, sub { my $vtotal = 0; - my $total = keys %{ $channels{lc $chan}{''} }; +# my $c = lc $cache{verstats}; + my $c = lc $chan; + my $total = keys %{ $channels{$c}{''} }; +# delete $cache{verstats}; foreach (keys %ver) { $vtotal += scalar keys %{ $ver{$_} }; @@ -705,7 +710,7 @@ sub do_verstats { } } - &pSReply( &formListReply(0, "IRC Client versions for $chan ", @list) ); + &pSReply( &formListReply(0, "IRC Client versions for $c ", @list) ); # clean up not-needed data structures. undef %ver; -- 2.39.2