Browse files

Return the list of servers if ServerBrowser.prototype.get is given no…

… arguments
  • Loading branch information...
1 parent 24dac7c commit 02641caca75cef4b0cd6783710f173bcc4073901 @gdaws committed Oct 10, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/gameserver/server_browser.js
View
5 lib/gameserver/server_browser.js
@@ -154,6 +154,11 @@ ServerBrowser.prototype.removeServer = function(hostname, port){
};
ServerBrowser.prototype.get = function(hostname, port){
+
+ if(arguments.length === 0){
+ return this._servers;
+ }
+
return this._serversByID[hostname + ":" + port];
};

0 comments on commit 02641ca

Please sign in to comment.