]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/IrcHooks.pl
- berkeley dbm support now works! thanks to tim riker.
[infobot.git] / src / IRC / IrcHooks.pl
index 957ca20a50dee4c90241649bf47812434eb7324b..8370a2178650f8c54d8a14dfa2e30ad33bc31e7f 100644 (file)
@@ -185,7 +185,7 @@ sub on_endofmotd {
 
     &status("End of motd. Now lets join some channels...");
     if (!scalar @joinchan) {
-       &WARN("joinchan array is empty!!!");
+       &WARN("joinchan array is empty!");
        @joinchan = &getJoinChans(1);
     }
 
@@ -459,6 +459,11 @@ sub on_join {
     my $i              = scalar(keys %{ $channels{$chan} });
     my $j              = $cache{maxpeeps}{$chan} || 0;
 
+    if (time() > $sched{shmFlush}{TIME} + 3600) {
+       &DEBUG("looks like schedulers died somewhere... restarting...");
+       &setupSchedulers();
+    }
+
     $chanstats{$chan}{'Join'}++;
     $userstats{lc $who}{'Join'} = time() if (&IsChanConf("seenStats"));
     $cache{maxpeeps}{$chan}    = $i if ($i > $j);
@@ -1169,7 +1174,8 @@ sub on_chanfull {
     my ($self, $event) = @_;
     my @args   = $event->args;
 
-    &DEBUG("on_chanfull: args => @args");
+    &status(">>> chanfull/$b_blue$args[1]$ob");
+
     &joinNextChan();
 }
 
@@ -1177,15 +1183,18 @@ sub on_inviteonly {
     my ($self, $event) = @_;
     my @args   = $event->args;
 
-    &DEBUG("on_inviteonly: args => @args");
+    &status(">>> inviteonly/$b_cyan$args[1]$ob");
+
     &joinNextChan();
 }
 
 sub on_banned {
     my ($self, $event) = @_;
     my @args   = $event->args;
+    my $chan   = $args[1];
+
+    &status(">>> banned/$b_blue$chan$ob $b_cyan$args[0]$ob");
 
-    &DEBUG("on_banned: args => @args");
     &joinNextChan();
 }