diff --git a/PBot/FactoidModuleLauncher.pm b/PBot/FactoidModuleLauncher.pm index 02df7308..7325374d 100644 --- a/PBot/FactoidModuleLauncher.pm +++ b/PBot/FactoidModuleLauncher.pm @@ -52,12 +52,12 @@ sub execute_module { $self->{pbot}->logger->log("(" . (defined $from ? $from : "(undef)") . "): $nick!$user\@$host: Executing module $module $arguments\n"); + $arguments =~ s/\$nick/$nick/g; + $arguments = quotemeta($arguments); $arguments =~ s/\\\s+/ /g; $arguments =~ s/\-/-/g; - print "args: $arguments\n"; - my $pid = fork; if(not defined $pid) { $self->{pbot}->logger->log("Could not fork module: $!\n");