channel/chat: don't allow users to unmute themselves
This commit is contained in:
parent
237a4ae0e0
commit
c5e73e156a
|
@ -584,6 +584,13 @@ ChatModule.prototype.handleCmdUnmute = function (user, msg, meta) {
|
|||
}
|
||||
name = name.toLowerCase();
|
||||
|
||||
if (name === user.getName().toLowerCase()) {
|
||||
user.socket.emit("errorMsg", {
|
||||
msg: "You are not allowed to unmute yourself"
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.isMuted(name)) {
|
||||
user.socket.emit("errorMsg", {
|
||||
msg: name + " is not muted."
|
||||
|
|
Loading…
Reference in a new issue