$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 "") {
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.
+ $cache{join}{$thischan} = $who; # used for on_join self.
&joinchan($chankey);
&status("JOIN $chankey <$who>");
return;
}
- # allowOutsiders.
- if (&IsParam("disallowOutsiders") and $msgType =~ /private/i) {
- my $found = 0;
-
- foreach (keys %channels) {
- next unless (&IsNickInChan($who,$_));
-
- $found++;
- last;
- }
-
- if (!$found and scalar(keys %channels)) {
- &status("OUTSIDER <$who> $message");
- return 'OUTSIDER';
- }
- }
-
- # User Processing, for all users.
- if ($addressed) {
- my $retval;
- return 'returned from pCH' if &parseCmdHook("main",$message);
-
- $retval = &userCommands();
- return unless (defined $retval);
- return if ($retval eq $noreply);
- }
-
# 'identify'
if ($msgType =~ /private/ and $message =~ s/^identify//) {
$message =~ s/^\s+|\s+$//g;
return;
}
- if (!&ckpass($array[0], $crypt)) {
+ if (!&ckpasswd($array[0], $crypt)) {
&pSReply("invalid passwd for $do_nick.");
return;
}
return;
}
+ # allowOutsiders.
+ if (&IsParam("disallowOutsiders") and $msgType =~ /private/i) {
+ my $found = 0;
+
+ foreach (keys %channels) {
+ next unless (&IsNickInChan($who,$_));
+
+ $found++;
+ last;
+ }
+
+ if (!$found and scalar(keys %channels)) {
+ &status("OUTSIDER <$who> $message");
+ return 'OUTSIDER';
+ }
+ }
+
+ # User Processing, for all users.
+ if ($addressed) {
+ my $retval;
+ return 'returned from pCH' if &parseCmdHook("main",$message);
+
+ $retval = &userCommands();
+ return unless (defined $retval);
+ return if ($retval eq $noreply);
+ }
+
###
# once useless messages have been parsed out, we match them.
###
return;
}
- # strongly requested by #debian on 19991028. -xk
- if (1 and $faqtoid !~ /^\Q$who\E$/i and &IsFlag("o") ne "o") {
- &msg($who,"sorry, locking cannot be used since it can be abused unneccesarily.");
- &status("Replace 1 with 0 in Process.pl#~324 for locking support.");
- return;
- }
-
if (&getFactoid($faqtoid) eq "") {
&msg($who, "factoid \002$faqtoid\002 does not exist");
return;
}
if ($function eq "lock") {
+ # strongly requested by #debian on 19991028. -xk
+ if (1 and $faqtoid !~ /^\Q$who\E$/i and &IsFlag("o") ne "o") {
+ &msg($who,"sorry, locking cannot be used since it can be abused unneccesarily.");
+ &status("Replace 1 with 0 in Process.pl#~324 for locking support.");
+ return;
+ }
+
&CmdLock($faqtoid);
} else {
&CmdUnLock($faqtoid);