Chat displays whether someone is an admin or moderator in the list of users.
This commit is contained in:
@@ -164,8 +164,20 @@ public class ChatRequestHandler extends LotroServerRequestHandler implements Uri
|
||||
|
||||
for (String userInRoom : usersInRoom) {
|
||||
Element user = doc.createElement("user");
|
||||
user.appendChild(doc.createTextNode(userInRoom));
|
||||
user.appendChild(doc.createTextNode(formatPlayerNameForChatList(userInRoom)));
|
||||
chatElem.appendChild(user);
|
||||
}
|
||||
}
|
||||
|
||||
private String formatPlayerNameForChatList(String userInRoom) {
|
||||
final Player player = _playerDao.getPlayer(userInRoom);
|
||||
if (player != null) {
|
||||
final String playerType = player.getType();
|
||||
if (playerType.contains("a"))
|
||||
return "*"+userInRoom;
|
||||
else if (playerType.contains("l"))
|
||||
return "+"+userInRoom;
|
||||
}
|
||||
return userInRoom;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,11 +212,9 @@ var ChatBoxUI = Class.extend({
|
||||
|
||||
if (this.chatListDiv != null) {
|
||||
this.chatListDiv.html("");
|
||||
var players = new Array();
|
||||
for (var i = 0; i < users.length; i++) {
|
||||
var user = users[i];
|
||||
var userName = user.childNodes[0].nodeValue;
|
||||
players.push(userName);
|
||||
this.chatListDiv.append("<div class='chatUser'>" + userName + "</div>");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user