]> git.donarmstrong.com Git - infobot.git/commitdiff
- on_disconnect: check if $self is defined. debugging added.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 3 Jan 2002 13:30:04 +0000 (13:30 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 3 Jan 2002 13:30:04 +0000 (13:30 +0000)
- run miscCheck in DebianDownload.

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

src/CommandStubs.pl
src/IRC/IrcHooks.pl
src/Modules/Debian.pl

index 92eb15c116902d32c086a837e802a1cfe57ae024..c83d46a6cc1746c4757dd75e4f3b37bddf146a40 100644 (file)
@@ -797,7 +797,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 +806,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();
     } );
 
index 587b4a97939ea265900a1f687513a2494c6753e8..4a424dc58ab6659511919f86a078df58f34e5995 100644 (file)
@@ -363,13 +363,20 @@ sub on_disconnect {
     # clear any variables on reconnection.
     $nickserv = 0;
 
+    &DEBUG("on_disconnect: 1");
     &clearIRCVars();
-    if (!$self->connect()) {
+    &DEBUG("on_disconnect: 2");
+    if (defined $self and !$self->connect()) {
+       &DEBUG("on_disconnect: 3");
        &WARN("not connected? help me. gonna call ircCheck() in 60s");
        &clearIRCVars();
        &ScheduleThis(1, "ircCheck");
 #      &ScheduleThis(10, "ircCheck");
 #      &ScheduleThis(30, "ircCheck");
+    } else {
+       &WARN("on_disconnect: self is undefined! WTF");
+       &DEBUG("running function irc... lets hope this works.");
+       &irc();
     }
 }
 
index 0538c9d72b43310aaca79e4aa86d84012d795993..ffda84f909e04b45780b4044b93c183f7d83754d 100644 (file)
@@ -149,6 +149,9 @@ sub DebianDownload {
        }
     }
 
+    # ok... lets just run this.
+    &::miscCheck();
+
     if ($good) {
        &generateIndex($dist);
        return 1;