forked from External/mage
* Changed logging level back to info, changed level of a lot of messages to debug from info. Added check that certain AI players can't join a table with no appropriate format.
This commit is contained in:
parent
7a4469fd80
commit
d34779fa68
26 changed files with 146 additions and 69 deletions
|
|
@ -82,7 +82,7 @@ public class Session {
|
|||
Pattern p = Pattern.compile(ConfigSettings.getInstance().getUserNamePattern(), Pattern.CASE_INSENSITIVE);
|
||||
Matcher m = p.matcher(userName);
|
||||
if (m.find()) {
|
||||
throw new MageException("User name includes not allowed characters: use a-z, A-Z and 0-9");
|
||||
throw new MageException("User name '" + userName + "' includes not allowed characters: use a-z, A-Z and 0-9");
|
||||
}
|
||||
User user = UserManager.getInstance().createUser(userName, host);
|
||||
if (user == null) { // user already exists
|
||||
|
|
@ -99,11 +99,11 @@ public class Session {
|
|||
}
|
||||
}
|
||||
else {
|
||||
throw new MageException("User name already in use");
|
||||
throw new MageException("User name " + userName + " already in use");
|
||||
}
|
||||
}
|
||||
if (!UserManager.getInstance().connectToSession(sessionId, user.getId())) {
|
||||
throw new MageException("Error connecting");
|
||||
throw new MageException("Error connecting " + userName);
|
||||
}
|
||||
this.userId = user.getId();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue