3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Capabilities: minor fix to cap userhas

This commit is contained in:
Pragmatic Software 2020-02-10 14:52:01 -08:00
parent 1c7ead9953
commit 213740316a

View File

@ -205,8 +205,8 @@ sub capcmd {
return "Usage: cap userhas <user> [capability]; Lists capabilities belonging to <user>" if not defined $hostmask;
$cap = lc $cap if defined $cap;
my $u = $self->{pbot}->{users}->find_user('.*', $hostmask);
return "No such user $hostmask." if not defined $u;
my $u = $self->{pbot}->{users}->find_user($from, $hostmask);
return "No such user $hostmask in $from." if not defined $u;
if (defined $cap) {
return "Try again. No such capability $cap." if not $self->exists($cap);