';
rooms.chat.sort(function (a, b) {
return b.userCount - a.userCount;
});
for (var i = 0; i < rooms.chat.length; i++) {
var roomData = rooms.chat[i];
var id = toId(roomData.title);
var escapedDesc = Tools.escapeHTML(roomData.desc || '');
buf += '
';
}
this.$('.roomlist').last().html(buf);
},
roomlist: function () {
app.addPopup(BattleListPopup);
},
finduser: function () {
app.addPopupPrompt("Username", "Open", function (target) {
if (!target) return;
if (toId(target) === 'zarel') {
app.addPopup(Popup, {htmlMessage: "Zarel is very busy; please don't contact him this way. If you're looking for help, try joining the Help room?"});
return;
}
app.addPopup(UserPopup, {name: target});
});
}
});
}).call(this, jQuery);