public void recieveCommand(Commands command) {
		if (command == null) {
			return;
		}

		switch (command.getType()) {
		case Commands.LOGIN:
			logon((LoginCommand)command);
			break;
		case Commands.LOGOUT:
			logout();
			break;
		case Commands.WHISPER:
			whisper((WhisperCommand)command);
			break;
		case Commands.BROADCAST:
			broadcast((BroadcastCommand)command);
			break;
		case Commands.REGISTER:
			register((RegisterCommand)command);
			break;
		case Commands.CHECKUSERS:
			getUsers((CheckUsersCommand)command);
			break;
		}
		
	}