3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-27 21:22:36 +01:00

StdinReader: chomp newline from input before logging

This commit is contained in:
Pragmatic Software 2020-01-03 21:22:14 -08:00
parent cdb7ac1901
commit ea016dc406

View File

@ -37,6 +37,7 @@ sub initialize {
sub stdin_reader {
my ($self, $input) = @_;
chomp $input;
# make sure we're in the foreground first
$self->{foreground} = (tcgetpgrp($self->{tty_fd}) == getpgrp()) ? 1 : 0;