From 27c1f78dbd8111038126c40c357132a4d5fe4bf4 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 4 May 2013 12:30:38 -0500 Subject: [PATCH] Add banlist to acp --- channel.js | 4 +-- server.js | 3 ++- www/acp.html | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 3 deletions(-) diff --git a/channel.js b/channel.js index e257abe9..54547ef4 100644 --- a/channel.js +++ b/channel.js @@ -177,10 +177,10 @@ Channel.prototype.saveDump = function() { // Save channel dumps every 5 minutes, in case of crash function incrementalDump(chan) { - if(chan && chan.users.length > 0) { + if(chan && chan.users && chan.users.length > 0) { chan.saveDump(); + setTimeout(function() { incrementalDump(chan); }, 300000); } - setTimeout(function() { incrementalDump(chan); }, 300000); } Channel.prototype.tryRegister = function(user) { diff --git a/server.js b/server.js index 577bced1..561f66f7 100644 --- a/server.js +++ b/server.js @@ -9,7 +9,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -const VERSION = "1.5.3"; +const VERSION = "1.5.4"; var fs = require("fs"); var Logger = require("./logger.js"); @@ -107,6 +107,7 @@ exports.io.sockets.on("connection", function(socket) { Logger.syslog.log("Accepted connection from /" + user.ip); }); + process.on("uncaughtException", function(err) { Logger.errlog.log("[SEVERE] Uncaught Exception: " + err); }); diff --git a/www/acp.html b/www/acp.html index 36fb67d3..a0dbff79 100644 --- a/www/acp.html +++ b/www/acp.html @@ -76,6 +76,20 @@

             
         
+        
+
+

Global Bans

+ + + + + + + + +
IPReason
+
+