Remove ability to mute same or higher rank

This commit is contained in:
calzoneman 2013-06-25 11:57:04 -04:00
parent 11734f5e62
commit 170e16ca82

View file

@ -103,6 +103,12 @@ function handleMute(chan, user, args) {
}
if(person) {
if(person.rank >= user.rank) {
user.socket.emit("errorMsg", {
msg: "You don't have permission to mute that person."
});
return;
}
person.meta.icon = "icon-volume-off";
person.muted = true;
chan.broadcastUserUpdate(person);
@ -123,6 +129,12 @@ function handleUnmute(chan, user, args) {
}
if(person) {
if(person.rank >= user.rank) {
user.socket.emit("errorMsg", {
msg: "You don't have permission to unmute that person."
});
return;
}
person.meta.icon = false;
person.muted = false;
chan.broadcastUserUpdate(person);