3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

Users: actually, make $any_channel less any channel

This commit is contained in:
Pragmatic Software 2020-02-10 14:46:43 -08:00
parent eb40f3b2cd
commit 1c7ead9953

View File

@ -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/[*?]/) {