$chanconf{$chan}{$1} = 1;
} elsif (/^[\s\t]+\-(\S+)$/) { # bool, false.
- &DEBUG("deprecated support of negative options.") unless ($cache{negative});
# although this is supported in run-time configuration.
- $cache{negative} = 1;
-# $chanconf{$chan}{$1} = 0;
+ $chanconf{$chan}{$1} = 0;
} elsif (/^[\s\t]+(\S+)[\s\t]+(.*)$/) {# what = val.
$chanconf{$chan}{$1} = $2;
}
}
- delete $cache{negative};
-
&status("CHANFILE: Loaded: ".(scalar(keys %chanconf)-1)." chans");
}
### ".chanset +blah"
### ".chanset +blah 10" -- error.
- my $state = ($1 eq "+") ? 1 : 0;
+ my $set = ($1 eq "+") ? 1 : 0;
my $was = $chanconf{$chan}{$what};
- if ($state) { # add/set.
+ if ($set) { # add/set.
if (defined $was and $was eq "1") {
&performStrictReply("setting $what for $chan already 1.");
return;
return;
}
- if ($was eq "0") {
- &performStrictReply("setting $what for $chan already 0.");
- return;
- }
-
$val = 0;
}
# alter for cosmetic (print out) reasons only.
- $was = ($was) ? "; was '$was'" : "";
+ $was = (defined $was) ? "; was '$was'" : "";
if ($val eq "0") {
&performStrictReply("Unsetting $what for $chan$was.");