mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Capabilities: minor fix to cap userhas
This commit is contained in:
parent
1c7ead9953
commit
213740316a
@ -205,8 +205,8 @@ sub capcmd {
|
|||||||
return "Usage: cap userhas <user> [capability]; Lists capabilities belonging to <user>" if not defined $hostmask;
|
return "Usage: cap userhas <user> [capability]; Lists capabilities belonging to <user>" if not defined $hostmask;
|
||||||
$cap = lc $cap if defined $cap;
|
$cap = lc $cap if defined $cap;
|
||||||
|
|
||||||
my $u = $self->{pbot}->{users}->find_user('.*', $hostmask);
|
my $u = $self->{pbot}->{users}->find_user($from, $hostmask);
|
||||||
return "No such user $hostmask." if not defined $u;
|
return "No such user $hostmask in $from." if not defined $u;
|
||||||
|
|
||||||
if (defined $cap) {
|
if (defined $cap) {
|
||||||
return "Try again. No such capability $cap." if not $self->exists($cap);
|
return "Try again. No such capability $cap." if not $self->exists($cap);
|
||||||
|
Loading…
Reference in New Issue
Block a user