public boolean registerClient(String userName, String sessionId, MageVersion version) throws MageException {
try {
if (version.compareTo(Main.getVersion()) != 0) {
logger.info("MageVersionException: userName=" + userName + ", version=" + version);
LogServiceImpl.instance.log(LogKeys.KEY_WRONG_VERSION, userName, version.toString(), Main.getVersion().toString(), sessionId);
throw new MageVersionException(version, Main.getVersion());
}
return SessionManager.getInstance().registerUser(sessionId, userName);
} catch (MageException ex) {
if (ex instanceof MageVersionException) {
throw (MageVersionException)ex;