mirror of https://github.com/calzoneman/sync.git
Fix /unmute with empty name
This commit is contained in:
parent
731ab3f9a5
commit
d2027d2e5a
|
@ -537,7 +537,14 @@ ChatModule.prototype.handleCmdUnmute = 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: "/unmute requires a target name"
|
||||
});
|
||||
return;
|
||||
}
|
||||
name = name.toLowerCase();
|
||||
|
||||
if (!this.isMuted(name)) {
|
||||
user.socket.emit("errorMsg", {
|
||||
|
|
Loading…
Reference in New Issue