]> git.donarmstrong.com Git - infobot.git/blobdiff - src/CommandStubs.pl
- patch from Morten Brix Pedersen <morten@wtf.dk>. Thanks!
[infobot.git] / src / CommandStubs.pl
index 92eb15c116902d32c086a837e802a1cfe57ae024..1a55669aef5b19ad323f1480aa82a45997506e3f 100644 (file)
@@ -280,6 +280,11 @@ sub Modules {
        $itc =~ s/([^\w\s])/\\$1/g;
        my $z = join '|', split ' ', $itc;
 
+       if ($msgType eq "privmsg" and $message =~ / ($mask{chan})$/) {
+           &DEBUG("ircTC: privmsg detected; chan = $1");
+           $chan = $1;
+       }
+
        if ($message =~ /^_stats(\s+(\S+))$/i) {
            &textstats_main($2);
            return;
@@ -797,7 +802,7 @@ sub do_verstats {
        return;
     }
 
-    &msg($who, "Sending CTCP VERSION...");
+    &msg($who, "Sending CTCP VERSION to #$chan...");
     $conn->ctcp("VERSION", $chan);
     $cache{verstats}{chan}     = $chan;
     $cache{verstats}{who}      = $who;
@@ -806,13 +811,12 @@ sub do_verstats {
     $conn->schedule(30, sub {
        my $c           = lc $cache{verstats}{chan};
        @vernicktodo    = ();
+
        foreach (keys %{ $channels{$c}{''} } ) {
            next if (grep /^\Q$_\E$/i, @vernick);
            push(@vernicktodo, $_);
        }
 
-       &DEBUG("verstats(30): we have ".scalar(@vernicktodo)." nicks to do");
-
        &verstats_flush();
     } );