Correct minor logic error

This commit is contained in:
Pragmatic Software 2015-03-16 23:22:18 -07:00
parent b45b707ec2
commit 728e05e514
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ sub blacklist {
$channel = '.*' if not defined $channel; $channel = '.*' if not defined $channel;
if(not exists $self->{blacklist}->{$channel} and not exists $self->{blacklist}->{$channel}->{$mask}) { if(exists $self->{blacklist}->{$channel} and not exists $self->{blacklist}->{$channel}->{$mask}) {
$self->{pbot}->{logger}->log("$nick attempt to remove nonexistent [$mask][$channel] from blacklist\n"); $self->{pbot}->{logger}->log("$nick attempt to remove nonexistent [$mask][$channel] from blacklist\n");
return "$mask not found in blacklist for channel $channel (use `blacklist list` to display blacklist)"; return "$mask not found in blacklist for channel $channel (use `blacklist list` to display blacklist)";
} }

View File

@ -88,7 +88,7 @@ sub unignore_user {
$channel = ".*"; $channel = ".*";
} }
if(not exists ${ $self->{pbot}->{ignorelist}->{ignore_list} }{$target}{$channel}) { if(exists $self->{pbot}->{ignorelist}->{ignore_list}->{$target} and not exists $self->{pbot}->{ignorelist}->{ignore_list}->{$target}->{$channel}) {
$self->{pbot}->{logger}->log("$nick attempt to remove nonexistent [$target][$channel] from ignore list\n"); $self->{pbot}->{logger}->log("$nick attempt to remove nonexistent [$target][$channel] from ignore list\n");
return "/msg $nick [$target][$channel] not found in ignore list (use `ignore list` to list ignores)"; return "/msg $nick [$target][$channel] not found in ignore list (use `ignore list` to list ignores)";
} }