]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/IrcHooks.pl
fix unsetting autojoin when trying to join invite-only channel
[infobot.git] / src / IRC / IrcHooks.pl
index f0c289d171033d9dbcb1301a3416e05119545889..bcb6fcabe9146d4da5f50e0cae074ebc49b667fd 100644 (file)
@@ -463,8 +463,10 @@ sub on_endofnames {
 
     &chanServCheck($chan);
 
+    # FIXME: scheduler is b0rken! flood join for now
     # schedule used to solve ircu (OPN) 'target too fast' problems.
-    $conn->schedule( 5, sub { &joinNextChan(); } );
+    #$conn->schedule( 5, sub { &joinNextChan(); } );
+    &joinNextChan();
 }
 
 sub on_init {
@@ -1328,8 +1330,8 @@ sub on_chanfull {
     my ($event) = @_;
     my @args = $event->args;
 
-    &status(">>> chanfull/$b_blue$args[1]$ob");
-
+    &status(">>> chanfull/$b_blue$args[1]$ob, removing autojoin");
+    delete $chanconf{$chan}{autojoin};
     &joinNextChan();
 }
 
@@ -1337,9 +1339,10 @@ sub on_inviteonly {
     $conn = shift(@_);
     my ($event) = @_;
     my @args = $event->args;
+    my $chan = $args[1];
 
-    &status(">>> inviteonly/$b_cyan$args[1]$ob");
-
+    &status(">>> inviteonly/$b_cyan$chan$ob, removing autojoin");
+    delete $chanconf{$chan}{autojoin};
     &joinNextChan();
 }