From 728e05e51423f741d564a959b891f317f140bcf5 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 16 Mar 2015 23:22:18 -0700 Subject: [PATCH] Correct minor logic error --- PBot/BlackList.pm | 2 +- PBot/IgnoreListCommands.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/BlackList.pm b/PBot/BlackList.pm index 53752fb7..a30ece2c 100644 --- a/PBot/BlackList.pm +++ b/PBot/BlackList.pm @@ -187,7 +187,7 @@ sub blacklist { $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"); return "$mask not found in blacklist for channel $channel (use `blacklist list` to display blacklist)"; } diff --git a/PBot/IgnoreListCommands.pm b/PBot/IgnoreListCommands.pm index 03aedfcd..b3f41064 100644 --- a/PBot/IgnoreListCommands.pm +++ b/PBot/IgnoreListCommands.pm @@ -88,7 +88,7 @@ sub unignore_user { $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"); return "/msg $nick [$target][$channel] not found in ignore list (use `ignore list` to list ignores)"; }