diff -r 6fceb66e1ad7 -r bb6990c0dd1a org/sonews/daemon/command/HelpCommand.java --- a/org/sonews/daemon/command/HelpCommand.java Fri Jun 26 16:48:50 2009 +0200 +++ b/org/sonews/daemon/command/HelpCommand.java Thu Aug 20 14:31:19 2009 +0200 @@ -30,34 +30,41 @@ * @author Christian Lins * @since sonews/0.5.0 */ -public class HelpCommand extends AbstractCommand +public class HelpCommand implements Command { - - public HelpCommand(final NNTPConnection conn) - { - super(conn); - } @Override public boolean hasFinished() { return true; } + + @Override + public boolean isStateful() + { + return true; + } + + @Override + public String[] getSupportedCommandStrings() + { + return new String[]{"HELP"}; + } @Override - public void processLine(final String line) + public void processLine(NNTPConnection conn, final String line, byte[] raw) throws IOException { - printStatus(100, "help text follows"); + conn.println("100 help text follows"); final String[] help = Resource .getAsString("helpers/helptext", true).split("\n"); for(String hstr : help) { - println(hstr); + conn.println(hstr); } - println("."); + conn.println("."); } }