Fix handling of /mute with no name
This commit is contained in:
parent
53971af737
commit
c8684d58ed
|
@ -426,7 +426,15 @@ ChatModule.prototype.handleCmdMute = function (user, msg, meta) {
|
|||
var args = msg.split(" ");
|
||||
args.shift(); /* shift off /mute */
|
||||
|
||||
var name = args.shift().toLowerCase();
|
||||
var name = args.shift();
|
||||
if (typeof name !== "string") {
|
||||
user.socket.emit("errorMsg", {
|
||||
msg: "/mute requires a target name"
|
||||
});
|
||||
return;
|
||||
}
|
||||
name = name.toLowerCase();
|
||||
|
||||
var target;
|
||||
|
||||
for (var i = 0; i < this.channel.users.length; i++) {
|
||||
|
|
Loading…
Reference in a new issue