From ed465a2ff1beb673ace116d91ef2e1e94bb37ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Dahlgren?= Date: Mon, 28 Jul 2014 19:50:06 +0200 Subject: [PATCH] Sort servers by title --- manager.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manager.js b/manager.js index 0785fa6..b1fcb09 100644 --- a/manager.js +++ b/manager.js @@ -169,6 +169,10 @@ Manager.prototype._addServer = (function (id, title, port, mods) { this.serversArr.push(server); this.serversHash[id] = server; + this.serversArr.sort(function(a, b) { + return a.title.localeCompare(b.title); + }); + var self = this; var statusChanged = function () { self.emit('servers');