summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1b00a2d)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1254
c11ca15a-4712-0410-83d8-
924469b57eb5
### ".chanset +blah"
### ".chanset +blah 10" -- error.
### ".chanset +blah"
### ".chanset +blah 10" -- error.
- my $state = ($1 eq "+") ? 1 : 0;
+ my $set = ($1 eq "+") ? 1 : 0;
my $was = $chanconf{$chan}{$what};
my $was = $chanconf{$chan}{$what};
- if ($state) { # add/set.
if (defined $was and $was eq "1") {
&performStrictReply("setting $what for $chan already 1.");
return;
if (defined $was and $was eq "1") {
&performStrictReply("setting $what for $chan already 1.");
return;
- if ($was eq "0") {
- &performStrictReply("setting $what for $chan already 0.");
- return;
- }
-
$val = 0;
}
# alter for cosmetic (print out) reasons only.
$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.");
if ($val eq "0") {
&performStrictReply("Unsetting $what for $chan$was.");