3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +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

@ -51,7 +51,7 @@ sub cmd_unset {
my ($command, $key) = $self->{pbot}->{interpreter}->split_args($context->{arglist}, 2);
if (not defined $command or not defined $key ) {
if (not defined $command or not defined $key) {
return "Usage: cmdunset <command> <key>";
}

View File

@ -138,12 +138,7 @@ sub launch_module {
my $args = $context->{arguments};
if (not $context->{args_utf8}) {
$self->{pbot}->{logger}->log("encoding args ($args)\n");
$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));
@ -156,16 +151,8 @@ sub launch_module {
my $exitval = $? >> 8;
$self->{pbot}->{logger}->log("stdout before: $stdout\n");
utf8::decode $stdout;
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);
};