mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-22 18:52:40 +01:00
chdir to modules directory before executing module
This commit is contained in:
parent
a04dae42ca
commit
a255cf258d
@ -124,6 +124,11 @@ sub execute_module {
|
||||
if($pid == 0) { # start child block
|
||||
$self->{child} = 1; # set to be killed after returning
|
||||
|
||||
if(not chdir $module_dir) {
|
||||
$self->{pbot}->logger->log("Could not chdir to '$module_dir': $!\n");
|
||||
die $!;
|
||||
}
|
||||
|
||||
if(defined $tonick) {
|
||||
$self->{pbot}->logger->log("($from): $nick!$user\@$host) sent to $tonick\n");
|
||||
$text = `$module_dir/$module $arguments`;
|
||||
|
Loading…
Reference in New Issue
Block a user