]> git.donarmstrong.com Git - infobot.git/commitdiff
- pointless regex in on_dcc_chat_open that I was going to deal with on
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 8 Feb 2001 15:50:01 +0000 (15:50 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 8 Feb 2001 15:50:01 +0000 (15:50 +0000)
  failed WHOIS (nuh) lookups... now we just compare against "GETTING-NOW"
- on_quit debug info much cleaner now.

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

src/IRC/IrcHooks.pl

index 9eec53b043cfa0fa0276b020e810951d36e62ac2..7362033ac5fa37ede17a96fdaa9fbe6107d20053 100644 (file)
@@ -267,11 +267,7 @@ sub on_dcc_open {
 sub on_dcc_open_chat {
     my(undef, $nick,$sock) = @_;
 
-    &DEBUG("nuh{$nick} => $nuh{$nick}.");
-    if ($nuh{$nick} =~ /^(\S+)(\d+)$/) {
-       my $i = $2;
-       $i++;
-       $nuh{$nick} = $1.$i;
+    if ($nuh{$nick} eq "GETTING-NOW") {
        &DEBUG("getting nuh for $nick failed. FIXME.");
        return;
     }
@@ -709,15 +705,20 @@ sub on_quit {
     my $nick = $event->nick();
     my $reason = ($event->args)[0];
 
+    my $count  = 0;
     foreach (keys %channels) {
        # fixes inconsistent chanstats bug #1.
        if (!&IsNickInChan($nick,$_)) {
-           &DEBUG("on_quit: nick $nick was not in chan $_.");
+           $count++;
            next;
        }
        $chanstats{$_}{'SignOff'}++;
     }
 
+    if ($count == scalar keys %channels) {
+       &DEBUG("on_quit: nick $nick was not found in any chan.");
+    }
+
     &DeleteUserInfo($nick, keys %channels);
 
     if (exists $nuh{lc $nick}) {