aboutsummaryrefslogtreecommitdiff
path: root/Mock/CommandRegistry.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Mock/CommandRegistry.pm')
-rw-r--r--Mock/CommandRegistry.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mock/CommandRegistry.pm b/Mock/CommandRegistry.pm
index 72c84cf..6531fd7 100644
--- a/Mock/CommandRegistry.pm
+++ b/Mock/CommandRegistry.pm
@@ -28,6 +28,7 @@ sub run_owned {
# XXX plugins need to eventually use the ctx hash directly. Much more
# readable than remembering the long chain of magic positional args each
# time you write a new cmd plugin
+ my @cmd_args = split /\s+/, $ctx{rest} if $ctx{rest};
my @args = (
$ctx{irc},
$ctx{logger},
@@ -36,7 +37,7 @@ sub run_owned {
$ctx{ided},
$ctx{rest},
$ctx{no_reenter},
- $ctx{args}
+ @cmd_args
);
$self->{_commands}->{$owner}->{$command}->(@args);