diff --git a/lib/channel/kickban.js b/lib/channel/kickban.js index 33c88f90..233e02f3 100644 --- a/lib/channel/kickban.js +++ b/lib/channel/kickban.js @@ -154,7 +154,7 @@ KickBanModule.prototype.handleCmdKick = function (user, msg, meta) { var args = msg.split(" "); args.shift(); /* shift off /kick */ - if (args.length === 0) { + if (args.length === 0 || args[0].trim() === "") { return user.socket.emit("errorMsg", { msg: "No kick target specified. If you're trying to kick " + "anonymous users, use /kickanons" @@ -213,7 +213,7 @@ KickBanModule.prototype.handleCmdKickAnons = function (user, msg, meta) { KickBanModule.prototype.handleCmdBan = function (user, msg, meta) { var args = msg.split(" "); args.shift(); /* shift off /ban */ - if (args.length === 0) { + if (args.length === 0 || args[0].trim() === "") { return user.socket.emit("errorMsg", { msg: "No ban target specified." }); @@ -232,7 +232,7 @@ KickBanModule.prototype.handleCmdBan = function (user, msg, meta) { KickBanModule.prototype.handleCmdIPBan = function (user, msg, meta) { var args = msg.split(" "); args.shift(); /* shift off /ipban */ - if (args.length === 0) { + if (args.length === 0 || args[0].trim() === "") { return user.socket.emit("errorMsg", { msg: "No ban target specified." });