forked from External/mage
Added user info text that user can set. Addd chat whisper command. Some minor changes to chat. Impoved display of user list.
This commit is contained in:
parent
e9dd478848
commit
c0323c168c
19 changed files with 522 additions and 356 deletions
|
|
@ -66,6 +66,7 @@ public class User {
|
|||
private String userName;
|
||||
private String sessionId = "";
|
||||
private String host;
|
||||
private String info;
|
||||
private Date connectionTime = new Date();
|
||||
private Date lastActivity = new Date();
|
||||
private UserState userState;
|
||||
|
|
@ -305,7 +306,7 @@ public class User {
|
|||
return this.userData;
|
||||
}
|
||||
|
||||
public String getUserInfo() {
|
||||
public String getGameInfo() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (gameSessions.size() > 0) {
|
||||
sb.append("G: ").append(gameSessions.size());
|
||||
|
|
@ -316,10 +317,14 @@ public class User {
|
|||
}
|
||||
sb.append("T: ").append(tournamentSessions.size());
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
sb.insert(0, " - [");
|
||||
sb.append("]");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String Info) {
|
||||
this.info = Info;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue