private void addMessage(RawMessage message) { if (!message.getCommand().equals(Numerics.SERVER_SUPPORT)) throw new IllegalArgumentException("Wrong numeric: " + message.getCommand()); RawMessage[] msgs = new RawMessage[index + 1]; msgs[index] = message; for (int i = 0; i < index; i++) { msgs[i] = messages[i]; } index++; messages = msgs; }
public boolean accept(RawMessage raw) { return raw.getCommand().equals("KICK"); }