From 01bca426a98a3e5238724f86c3b21326f1e91a80 Mon Sep 17 00:00:00 2001 From: timriker Date: Thu, 22 Jul 2004 20:22:33 +0000 Subject: [PATCH] on a keyed channel, you can join forever. oh. on second thought, better not. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1011 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/IRC/IrcHooks.pl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl index 8c989eb..aa92211 100644 --- a/blootbot/src/IRC/IrcHooks.pl +++ b/blootbot/src/IRC/IrcHooks.pl @@ -4,6 +4,7 @@ # Version: 20000126 # NOTE: Based on code by Kevin Lenzo & Patrick Cole (c) 1997 # +use vars qw(%chanconf); # GENERIC. TO COPY. sub on_generic { @@ -1234,8 +1235,8 @@ sub on_banned { my @args = $event->args; my $chan = $args[1]; - &status(">>> banned/$b_blue$chan$ob $b_cyan$args[0]$ob"); - #FIXME if $args[0] == me then kill autojoin! + &status(">>> banned/$b_blue$chan$ob $b_cyan$args[0]$ob, removing autojoin for $chan"); + delete $chanconf{$chan}{autojoin}; &joinNextChan(); } @@ -1243,8 +1244,10 @@ sub on_badchankey { $conn = shift(@_); my ($event) = @_; my @args = $event->args; + my $chan = $args[1]; - &DEBUG("on_badchankey: args => @args"); + &DEBUG("on_badchankey: args => @args, removing autojoin for $chan"); + delete $chanconf{$chan}{autojoin}; &joinNextChan(); } @@ -1257,4 +1260,13 @@ sub on_useronchan { &joinNextChan(); } +# TODO not used yet +sub on_stdin { + &FIXME("on_stdin"); + + my $line = ; + chomp($line); + &FIXME("on_stdin: line => \"$line\""); +} + 1; -- 2.39.5