Add setLeader callback

This commit is contained in:
calzoneman 2013-11-08 21:46:30 -06:00
parent 6588e90bfe
commit 7fc50db879

View file

@ -679,6 +679,18 @@ Callbacks = {
sortUserlist();
},
setLeader: function (name) {
$(".userlist_item").each(function () {
$(this).find(".icon-star-empty").remove();
});
if (name === "")
return;
var user = findUserlistItem(name);
if (user) {
$("<i/>").addClass("icon-star-empty").prependTo(user.children()[0]);
}
},
updateUser: function(data) {
if(data.name == CLIENT.name) {
CLIENT.leader = data.leader;