]> git.donarmstrong.com Git - infobot.git/commitdiff
final cruft from old static configuration file fixed... found by irq
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 5 Feb 2001 16:09:08 +0000 (16:09 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 5 Feb 2001 16:09:08 +0000 (16:09 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@347 c11ca15a-4712-0410-83d8-924469b57eb5

src/Process.pl

index 74909cee807c082785a5536c68c4b89dea40109e..93a3a32d25782417a8cf60d57bb1e79f138cac7c 100644 (file)
@@ -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.