X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FIRC%2FIrcHooks.pl;h=8370a2178650f8c54d8a14dfa2e30ad33bc31e7f;hb=99f86352e2eff21f5eef65c16c41b44e1bfa17b6;hp=957ca20a50dee4c90241649bf47812434eb7324b;hpb=718dfd2bf1dfca4df44eade76f6dee000ddcb8df;p=infobot.git diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl index 957ca20..8370a21 100644 --- a/src/IRC/IrcHooks.pl +++ b/src/IRC/IrcHooks.pl @@ -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(); }