From 11e91d02fbcc4fd123d799148202acf864e9e80a Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 25 Jun 2013 09:59:14 -0400 Subject: [PATCH] Fix unban bug --- channel.js | 2 +- www/assets/js/callbacks.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/channel.js b/channel.js index 555fcdaf..cd40d2f3 100644 --- a/channel.js +++ b/channel.js @@ -502,7 +502,7 @@ Channel.prototype.tryUnban = function(actor, data) { var ip = this.hideIP(data.ip_hidden); this.unbanIP(actor, ip); } - else if(data.name) { + if(data.name) { this.unbanName(actor, data.name); } } diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index b5e838a5..261b2c1d 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -341,9 +341,9 @@ Callbacks = { var aliases = $("").text(entries[i].aliases.join(", ")).appendTo(tr); var banner = $("").text(entries[i].banner).appendTo(tr); - var callback = (function(ip, name) { return function() { + var callback = (function(ip_hidden, name) { return function() { socket.emit("unban", { - ip: ip, + ip_hidden: ip_hidden, name: name }); } })(entries[i].ip_hidden, entries[i].name);