From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Thu, 3 Jan 2002 13:30:04 +0000 (+0000)
Subject: - on_disconnect: check if $self is defined. debugging added.
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=90d746564867c112d1066fa39d19bf5a161565bc;p=infobot.git

- on_disconnect: check if $self is defined. debugging added.
- run miscCheck in DebianDownload.


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

diff --git a/blootbot/src/CommandStubs.pl b/blootbot/src/CommandStubs.pl
index 92eb15c..c83d46a 100644
--- a/blootbot/src/CommandStubs.pl
+++ b/blootbot/src/CommandStubs.pl
@@ -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();
     } );
 
diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl
index 587b4a9..4a424dc 100644
--- a/blootbot/src/IRC/IrcHooks.pl
+++ b/blootbot/src/IRC/IrcHooks.pl
@@ -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();
     }
 }
 
diff --git a/blootbot/src/Modules/Debian.pl b/blootbot/src/Modules/Debian.pl
index 0538c9d..ffda84f 100644
--- a/blootbot/src/Modules/Debian.pl
+++ b/blootbot/src/Modules/Debian.pl
@@ -149,6 +149,9 @@ sub DebianDownload {
 	}
     }
 
+    # ok... lets just run this.
+    &::miscCheck();
+
     if ($good) {
 	&generateIndex($dist);
 	return 1;