mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Show user name in title bar of MAGE. Clear table chat after disconnect. Remove user from chat after disconnect. Some tweaking about the messages if a user disconnected/session expired.
This commit is contained in:
parent
ae30e9a884
commit
b6ddaabe44
12 changed files with 58 additions and 28 deletions
|
|
@ -177,8 +177,8 @@ public class SessionImpl implements Session {
|
|||
if (registerResult) {
|
||||
sessionState = SessionState.CONNECTED;
|
||||
serverState = server.getServerState();
|
||||
logger.info("Connected to MAGE server at " + connection.getHost() + ":" + connection.getPort());
|
||||
client.connected("Connected to " + connection.getHost() + ":" + connection.getPort() + " ");
|
||||
logger.info(new StringBuilder("Connected as ").append(this.getUserName()).append(" to MAGE server at ").append(connection.getHost()).append(":").append(connection.getPort()).toString());
|
||||
client.connected(new StringBuilder("Connected as ").append(this.getUserName()).append(" to ").append(connection.getHost()).append(":").append(connection.getPort()).append(" ").toString());
|
||||
return true;
|
||||
}
|
||||
disconnect(false);
|
||||
|
|
@ -1189,7 +1189,9 @@ public class SessionImpl implements Session {
|
|||
public boolean ping() {
|
||||
try {
|
||||
if (isConnected()) {
|
||||
server.ping(sessionId);
|
||||
if (!server.ping(sessionId)) {
|
||||
logger.error(new StringBuilder("Ping failed: ").append(this.getUserName()).append(" Session: ").append(sessionId).append(" to MAGE server at ").append(connection.getHost()).append(":").append(connection.getPort()).toString());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (MageException ex) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue