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;
$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();
} );
# 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();
}
}