mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 13:59:47 +01:00
Commands: use boundary when extracting admin channel from arguments
This commit is contained in:
parent
ab3776be88
commit
9dbd84f6c5
@ -100,7 +100,7 @@ sub interpreter {
|
||||
}
|
||||
|
||||
my $from = exists $stuff->{admin_channel_override} ? $stuff->{admin_channel_override} : $stuff->{from};
|
||||
my ($admin_channel) = $stuff->{arguments} =~ m/(#[^ ]+)/; # assume first channel-like argument
|
||||
my ($admin_channel) = $stuff->{arguments} =~ m/\B(#[^ ]+)/; # assume first channel-like argument
|
||||
$admin_channel = $from if not defined $admin_channel;
|
||||
my $admin = $self->{pbot}->{admins}->loggedin($admin_channel, "$stuff->{nick}!$stuff->{user}\@$stuff->{host}");
|
||||
my $level = defined $admin ? $admin->{level} : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user