3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

Progress on refactoring and polishing everything

This commit is contained in:
Pragmatic Software 2021-06-08 16:11:42 -07:00
parent bd63e2ab98
commit 2ff07cfe87
2 changed files with 1 additions and 14 deletions

View File

@ -138,12 +138,7 @@ sub launch_module {
my $args = $context->{arguments}; my $args = $context->{arguments};
if (not $context->{args_utf8}) { if (not $context->{args_utf8}) {
$self->{pbot}->{logger}->log("encoding args ($args)\n");
$args = encode('UTF-8', $args); $args = encode('UTF-8', $args);
$self->{pbot}->{logger}->log("encoded args ($args)\n");
my $test = decode('UTF-8', $args);
$self->{pbot}->{logger}->log("decoded test ($test)\n");
} }
my @cmdline = ("./$module", $self->{pbot}->{interpreter}->split_line($args)); my @cmdline = ("./$module", $self->{pbot}->{interpreter}->split_line($args));
@ -156,16 +151,8 @@ sub launch_module {
my $exitval = $? >> 8; my $exitval = $? >> 8;
$self->{pbot}->{logger}->log("stdout before: $stdout\n");
utf8::decode $stdout; utf8::decode $stdout;
utf8::decode $stderr; utf8::decode $stderr;
# decode('UTF-8', $stdout);
# decode('UTF-8', $stderr);
# decode('utf8', $stdout);
# decode('utf8', $stderr);
$self->{pbot}->{logger}->log("stdout after: $stdout\n");
return ($exitval, $stdout, $stderr); return ($exitval, $stdout, $stderr);
}; };