mirror of https://github.com/calzoneman/sync.git
Merge pull request #425 from calzoneman/muteadmin
site admins should be immune from kick/mute
This commit is contained in:
commit
7dab3276a6
|
@ -482,7 +482,8 @@ ChatModule.prototype.handleCmdMute = function (user, msg, meta) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.account.effectiveRank >= user.account.effectiveRank) {
|
if (target.account.effectiveRank >= user.account.effectiveRank
|
||||||
|
|| target.account.globalRank >= user.account.globalRank) {
|
||||||
user.socket.emit("errorMsg", {
|
user.socket.emit("errorMsg", {
|
||||||
msg: "/mute failed - " + target.getName() + " has equal or higher rank " +
|
msg: "/mute failed - " + target.getName() + " has equal or higher rank " +
|
||||||
"than you."
|
"than you."
|
||||||
|
@ -531,7 +532,8 @@ ChatModule.prototype.handleCmdSMute = function (user, msg, meta) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.account.effectiveRank >= user.account.effectiveRank) {
|
if (target.account.effectiveRank >= user.account.effectiveRank
|
||||||
|
|| target.account.globalRank >= user.account.globalRank) {
|
||||||
user.socket.emit("errorMsg", {
|
user.socket.emit("errorMsg", {
|
||||||
msg: "/smute failed - " + target.getName() + " has equal or higher rank " +
|
msg: "/smute failed - " + target.getName() + " has equal or higher rank " +
|
||||||
"than you."
|
"than you."
|
||||||
|
|
|
@ -175,7 +175,8 @@ KickBanModule.prototype.handleCmdKick = function (user, msg, meta) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.account.effectiveRank >= user.account.effectiveRank) {
|
if (target.account.effectiveRank >= user.account.effectiveRank
|
||||||
|
|| target.account.globalRank >= user.account.globalRank) {
|
||||||
return user.socket.emit("errorMsg", {
|
return user.socket.emit("errorMsg", {
|
||||||
msg: "You do not have permission to kick " + target.getName()
|
msg: "You do not have permission to kick " + target.getName()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue