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