Strip whitespace from right of process output

This commit is contained in:
Les De Ridder 2019-05-02 02:47:00 +02:00
parent 849494b1a7
commit 054a1bf15b
1 changed files with 2 additions and 3 deletions

View File

@ -67,7 +67,7 @@ void main()
auto stdoutFD = pollfd(pipes.stdout.fileno, POLLIN);
while (poll(&stdoutFD, 1, 0) > 0 && !pipes.stdout.eof)
{
auto line = pipes.stdout.readln;
auto line = pipes.stdout.readln.stripRight;
if (line.length > 0)
{
foreach (channel; Channels)
@ -79,7 +79,7 @@ void main()
pollfd stderrFD = { pipes.stderr.fileno, POLLIN };
while (poll(&stderrFD, 1, 0) > 0 && !pipes.stderr.eof)
{
auto line = pipes.stderr.readln;
auto line = pipes.stderr.readln.stripRight;
if (line.length > 0)
{
foreach (channel; Channels)
@ -119,7 +119,6 @@ void main()
ircClient.write(Message(null, "PONG", message.parameters));
break;
case "376":
writeln("376 376 376");
ircClient.join(Channels);
break;
case "PRIVMSG":