Users: `my` command now properly finds user account in other channels

This commit is contained in:
Pragmatic Software 2020-02-09 20:55:30 -08:00
parent 9afb8c506d
commit 04f624729a
1 changed files with 2 additions and 1 deletions

View File

@ -566,7 +566,8 @@ sub mycmd {
}
my ($found_channel, $found_hostmask) = $self->find_user_account($channel, $hostmask);
$found_channel = $channel if not defined $found_channel; # let DualIndexHashObject disambiguate
($found_channel, $found_hostmask) = $self->find_user_account('.*', $hostmask) if not defined $found_channel;
return "No user account found in $channel." if not defined $found_channel;
$result .= $self->{users}->set($found_channel, $found_hostmask, $key, $value);
$result =~ s/^password => .*;?$/password => <private>;/m;
return $result;