]> git.donarmstrong.com Git - infobot.git/commitdiff
don't call chanservcheck in joinnextchan
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 22 Apr 2001 12:25:06 +0000 (12:25 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 22 Apr 2001 12:25:06 +0000 (12:25 +0000)
call chanservcheck in on_endofnames
ircCheck "resets" itself if it thinks so

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

src/IRC/Irc.pl
src/IRC/IrcHooks.pl
src/IRC/Schedulers.pl

index 8d09e0abad3799c39fb8985c8298ec6826c89ffe..615b62f49c5f3c80b524c1eabfef7adeb4d258b3 100644 (file)
@@ -579,10 +579,6 @@ sub joinNextChan {
            &status("joinNextChan: $i chans to join.");
        }
 
-       # chanserv check: channel specific.
-       ### what the hell is this for...
-       &chanServCheck($chan);
-
     } else {
        # chanserv check: global channels, in case we missed one.
 
index 56e9760e47136c089ae5bf153bd8620b07f0148b..22df4e6a7a74f72ad43298ce7ab1610f0b9dbf53 100644 (file)
@@ -367,11 +367,13 @@ sub on_endofnames {
     my $chanstats = join(' || ', @array);
     &status("$b_blue$chan$ob: [$chanstats]");
 
-    &joinNextChan();
+    &chanServCheck($chan);
+
     if (scalar @joinchan) {    # remaining channels to join.
        # lets do two at once!
        &joinNextChan();
     }
+    &joinNextChan();
 }
 
 sub on_init {
index 5851b642c40fd8b996759cd500800533ad991ad6..484147d58d535a82ed29e5f7b1e6d4a05ff8c94d 100644 (file)
@@ -646,11 +646,13 @@ sub ircCheck {
        delete $sched{"ircCheck"}{RUNNING};
     }
 
-    my @array = grep !/^_default$/, keys %chanconf;
-    my $iconf = scalar(@array);
-    my $inow  = scalar(keys %channels);
+    my @x      = &getJoinChans();
+    my $iconf = scalar( @x );
+    my $inow  = scalar( keys %channels );
     if ($iconf > 2 and $inow * 2 <= $iconf) {
        &FIXME("ircCheck: current channels * 2 <= config channels. FIXME.");
+       @joinchan       = @x;
+       &joinNextChan();
     }
 
     if (!$conn->connected or time() - $msgtime > 3600) {