private void parseCommand(String command) {

		// Commands:
		// !new-bid <description>
		// !auction-ended <winner> <amount> <description>

		String cmdRegex = "![a-zA-Z-]+";
		String tmp;

		Scanner sc = new Scanner(command);
		sc.useDelimiter("\\s+");
		sc.skip("\\s*");

		if (!sc.hasNext(cmdRegex))
			return;

		tmp = sc.next();
		if (tmp.equalsIgnoreCase("!new-bid")) {
			if (!sc.hasNext())
				return;
			String description = sc.skip("\\s*").nextLine();

			if (listener != null)
				listener.newBid(description);
		} else if (tmp.equalsIgnoreCase("!auction-ended")) {
			if (!sc.hasNext())
				return;
			String winner = sc.next();
			if (!sc.hasNextDouble())
				return;
			double amount = sc.nextDouble();
			if (!sc.hasNext())
				return;
			String description = sc.skip("\\s*").nextLine();

			if (listener != null)
				listener.auctionEnded(winner, amount, description);
		}
	}