From 5d843358d2b2a9899668e889fa841113fc5cccf9 Mon Sep 17 00:00:00 2001 From: Erik Date: Tue, 6 Jan 2015 22:55:14 -0500 Subject: [PATCH] site admins should be immune from kick/mute --- lib/channel/chat.js | 6 ++++-- lib/channel/kickban.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/channel/chat.js b/lib/channel/chat.js index de63b83c..1e23debd 100644 --- a/lib/channel/chat.js +++ b/lib/channel/chat.js @@ -482,7 +482,8 @@ ChatModule.prototype.handleCmdMute = function (user, msg, meta) { 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", { msg: "/mute failed - " + target.getName() + " has equal or higher rank " + "than you." @@ -531,7 +532,8 @@ ChatModule.prototype.handleCmdSMute = function (user, msg, meta) { 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", { msg: "/smute failed - " + target.getName() + " has equal or higher rank " + "than you." diff --git a/lib/channel/kickban.js b/lib/channel/kickban.js index 233e02f3..9190b68d 100644 --- a/lib/channel/kickban.js +++ b/lib/channel/kickban.js @@ -175,7 +175,8 @@ KickBanModule.prototype.handleCmdKick = function (user, msg, meta) { 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", { msg: "You do not have permission to kick " + target.getName() });