3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-25 12:12:34 +01:00

ChanOpCommands: fix "Can't locate object method 'mode'" error

This commit is contained in:
Pragmatic Software 2020-05-30 23:18:49 -07:00
parent 136e220c9a
commit 4d888729e5

View File

@ -189,9 +189,9 @@ sub generic_mode {
$i++; $i++;
if ($i >= $max_modes) { if ($i >= $max_modes) {
my $args = "$channel $mode $list"; $context->{arguments} = "$channel $mode $list";
$context->{arglist} = $self->{pbot}->{interpreter}->make_args($args); $context->{arglist} = $self->{pbot}->{interpreter}->make_args($context->{arguments});
$result = $self->mode($channel, $context->{nick}, $context->{user}, $context->{host}, $args, $context); $result = $self->cmd_mode($context);
$mode = $flag; $mode = $flag;
$list = ''; $list = '';
$i = 0; $i = 0;
@ -201,9 +201,8 @@ sub generic_mode {
} }
if ($i) { if ($i) {
my $args = "$channel $mode $list"; $context->{arguments} = "$channel $mode $list";
$context->{arguments} = $args; $context->{arglist} = $self->{pbot}->{interpreter}->make_args($context->{arguments});
$context->{arglist} = $self->{pbot}->{interpreter}->make_args($args);
$result = $self->cmd_mode($context); $result = $self->cmd_mode($context);
} }