From 3ae2deca7cb6aba4afd4f325da64c552211576d2 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 21 Feb 2015 21:34:25 -0500 Subject: [PATCH] Fix cancel for kick/ban/ipban --- www/js/util.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/js/util.js b/www/js/util.js index 4d805e7e..d5540060 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -251,6 +251,9 @@ function addUserDropdown(entry) { .text("Kick") .click(function () { var reason = prompt("Enter kick reason (optional)"); + if (reason === null) { + return; + } socket.emit("chatMsg", { msg: "/kick " + name + " " + reason, meta: {} @@ -302,6 +305,9 @@ function addUserDropdown(entry) { .text("Name Ban") .click(function () { var reason = prompt("Enter ban reason (optional)"); + if (reason === null) { + return; + } socket.emit("chatMsg", { msg: "/ban " + name + " " + reason, meta: {} @@ -312,6 +318,9 @@ function addUserDropdown(entry) { .text("IP Ban") .click(function () { var reason = prompt("Enter ban reason (optional)"); + if (reason === null) { + return; + } socket.emit("chatMsg", { msg: "/ipban " + name + " " + reason, meta: {}