From: dms Date: Mon, 5 Feb 2001 16:09:08 +0000 (+0000) Subject: final cruft from old static configuration file fixed... found by irq X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fddeaf42a5be4ad9e851c404c157f09350349332;p=infobot.git final cruft from old static configuration file fixed... found by irq git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@347 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Process.pl b/src/Process.pl index 74909ce..93a3a32 100644 --- a/src/Process.pl +++ b/src/Process.pl @@ -50,7 +50,7 @@ sub process { $2 =~ /^($mask{chan})(,(\S+))?/; my($thischan, $key) = (lc $1, $3); - my $chankey = $thischan; + my $chankey = lc $thischan; $chankey .= " $key" if (defined $key); if ($thischan eq "") { @@ -58,18 +58,16 @@ sub process { return; } - # Thanks to Eden Li (tile) for the channel key patch - my @chans = split(/[\s\t]+/, $param{'join_channels'}); - if (!grep /^$thischan$/i, @chans) { - if (&IsFlag("o") ne "o") { + if (&IsFlag("o") ne "o") { + if (!exists $chanconf{$thischan}) { &msg($who, "I am not allowed to join $thischan."); return; } - } - if (&validChan($thischan) and &IsFlag("o") ne "o") { - &msg($who,"I'm already on $thischan..."); - return; + if (&validChan($thischan)) { + &msg($who,"I'm already on $thischan..."); + return; + } } $joinverb{$thischan} = $who; # used for on_join self.