mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-18 06:20:41 +01:00
StdinReader: chomp newline from input before logging
This commit is contained in:
parent
cdb7ac1901
commit
ea016dc406
@ -37,6 +37,7 @@ sub initialize {
|
|||||||
|
|
||||||
sub stdin_reader {
|
sub stdin_reader {
|
||||||
my ($self, $input) = @_;
|
my ($self, $input) = @_;
|
||||||
|
chomp $input;
|
||||||
|
|
||||||
# make sure we're in the foreground first
|
# make sure we're in the foreground first
|
||||||
$self->{foreground} = (tcgetpgrp($self->{tty_fd}) == getpgrp()) ? 1 : 0;
|
$self->{foreground} = (tcgetpgrp($self->{tty_fd}) == getpgrp()) ? 1 : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user