From 1c7ead9953abe5b2afc1732eb5b946281e6ac974 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 10 Feb 2020 14:46:43 -0800 Subject: [PATCH] Users: actually, make $any_channel less any channel --- PBot/Users.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/Users.pm b/PBot/Users.pm index d7268689..6f6899fb 100644 --- a/PBot/Users.pm +++ b/PBot/Users.pm @@ -150,7 +150,7 @@ sub find_user_account { } foreach my $chan (sort $sort keys %{ $self->{users}->{hash} }) { - if (($channel !~ m/^#/ and $any_channel) or $any_channel or $channel =~ m/^$chan$/i) { + if (($channel !~ m/^#/ and $any_channel) or $channel =~ m/^$chan$/i) { if (not exists $self->{users}->{hash}->{$chan}->{$hostmask}) { # find hostmask by account name or wildcard foreach my $mask (keys %{ $self->{users}->{hash}->{$chan} }) { @@ -196,7 +196,7 @@ sub find_user { my $user = eval { foreach my $channel_regex (sort $sort keys %{ $self->{users}->{hash} }) { - if (($channel !~ m/^#/ and $any_channel) or $any_channel or $channel =~ m/^$channel_regex$/i) { + if (($channel !~ m/^#/ and $any_channel) or $channel =~ m/^$channel_regex$/i) { foreach my $hostmask_regex (keys %{ $self->{users}->{hash}->{$channel_regex} }) { next if $hostmask_regex eq '_name'; if ($hostmask_regex =~ m/[*?]/) {