This commit is contained in:
calzoneman 2014-01-23 15:53:53 -06:00
parent 551d5b2c36
commit 6e2d9c3caa
5 changed files with 29 additions and 23 deletions

View file

@ -142,6 +142,15 @@ function handleIndex(req, res) {
loginName = req.cookies.auth.split(":")[0];
}
var channels = Server.getServer().packChannelList(true);
channels.sort(function (a, b) {
if (a.usercount === b.usercount) {
return a.uniqueName > b.uniqueName ? 1 : -1;
}
return a.usercount - b.usercount;
});
sendJade(res, "index", {
loggedIn: loginName !== false,
loginName: loginName,