Add uptime command
[xudocci.git] / src / main / java / net / pterodactylus / xdcc / ui / stdin / CommandReader.java
index 016c9d0..66447b0 100644 (file)
@@ -93,6 +93,7 @@ public class CommandReader extends AbstractExecutionThreadService {
                commandBuilder.add(new FailedDownloadsCommand(failedDownloads));
                commandBuilder.add(new RestartCommand(core, failedDownloads));
                commandBuilder.add(new ResearchCommand(core));
+               commandBuilder.add(new UptimeCommand(core));
                commands = commandBuilder.build();
        }
 
@@ -122,6 +123,7 @@ public class CommandReader extends AbstractExecutionThreadService {
                                Command command = eligibleCommands.iterator().next();
                                List<String> parameters = from(asList(words)).skip(1).toList();
                                state = command.execute(state, parameters, writer);
+                               writer.flush();
                        }
 
                        lastLine = line;