* Added chanset and help for verstats to allow disabling of command to prevent abuse
+* Fixed verstats to warn the channel about who involked the command and bug that
+was causing the output to go to random channels due to loss of variable scope
+
+* Added infobot client to verstats and cleaned up a few other client regex
+
1.5.2
=====
return;
}
- &msg( $who, "Sending CTCP VERSION to $chan; results in 60s." );
- $conn->ctcp( 'VERSION', $chan );
+ &msg( $who, "Sending CTCP VERSION to $chan; results in 60s." );
+ &msg( $chan, "WARNING: $who has forced me to CTCP VERSION the channel!" );
+
+ # Workaround for bug in Net::Irc, provided by quin@freenode. Details at:
+ # http://rt.cpan.org/Public/Bug/Display.html?id=11421
+ # $conn->ctcp( 'VERSION', $chan );
+ $conn->sl("PRIVMSG $chan :\001VERSION\001");
+
$cache{verstats}{chan} = $chan;
$cache{verstats}{who} = $who;
$cache{verstats}{msgType} = $msgType;
my $vtotal = 0;
my $c = lc $cache{verstats}{chan};
my $total = keys %{ $channels{$c}{''} };
- $chan = $c;
$who = $cache{verstats}{who};
$msgType = $cache{verstats}{msgType};
delete $cache{verstats}; # sufficient?
}
# hack. this is one major downside to scheduling.
- $chan = $c;
- &performStrictReply(
+ &msg($c,
&formListReply( 0, "IRC Client versions for $c ", @list ) );
# clean up not-needed data structures.
last unless ( scalar @vernicktodo );
my $n = shift(@vernicktodo);
- $conn->ctcp( 'VERSION', $n );
+ #$conn->ctcp( 'VERSION', $n );
+ # See do_verstats $conn->sl for explantaion
+ $conn->sl("PRIVMSG $n :\001VERSION\001");
}
return unless ( scalar @vernicktodo );
}
push( @vernick, $nick );
+ &DEBUG("on_crversion: Got '$ver' from $nick");
+
if ( $ver =~ /bitchx/i ) {
$ver{bitchx}{$nick} = $ver;
}
- elsif ( $ver =~ /xc\!|xchat/i ) {
+ elsif ( $ver =~ /infobot/i ) {
+ $ver{infobot}{$nick} = $ver;
+
+ }
+ elsif ( $ver =~ /(xc\!|xchat)/i ) {
$ver{xchat}{$nick} = $ver;
}
$ver{irssi}{$nick} = $ver;
}
- elsif ( $ver =~ /epic|(Third Eye)/i ) {
+ elsif ( $ver =~ /(epic|Third Eye)/i ) {
$ver{epic}{$nick} = $ver;
}
- elsif ( $ver =~ /ircII|PhoEniX/i ) {
+ elsif ( $ver =~ /(ircII|PhoEniX)/i ) {
$ver{ircII}{$nick} = $ver;
}
elsif ( $ver =~ /mirc/i ) {
-
- # &DEBUG("verstats: mirc: $nick => '$ver'.");
+ # Apparently, mIRC gets the reply as "VERSION " and doesnt like the
+ # space, so mirc matching is considered bugged.
$ver{mirc}{$nick} = $ver;
- # ok... then we get to the lesser known/used clients.
}
elsif ( $ver =~ /ircle/i ) {
$ver{ircle}{$nick} = $ver;