Bug 486979 - Don't let half-ops think they can grant/revoke half-op status on others.
ChatZilla only. p=glenjamin+bmo@gmail.com (Glen Mailer) r=silver git-svn-id: svn://10.0.0.236/trunk@257443 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4bd615d446
commit
cff87b44fb
@ -309,23 +309,25 @@ function initMenus()
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Me is op.
|
// Me is op.
|
||||||
var isop = "(cx.channel.iAmOp()) && ";
|
var isop = "(cx.channel.iAmOp()) && ";
|
||||||
// Me is op or half-op.
|
// Me is op or half-op.
|
||||||
var isopish = "(cx.channel.iAmOp() || cx.channel.iAmHalfOp()) && ";
|
var isopish = "(cx.channel.iAmOp() || cx.channel.iAmHalfOp()) && ";
|
||||||
// Server has half-ops.
|
// Server has half-ops.
|
||||||
var shop = "(cx.server.supports.prefix.indexOf('h') > 0) && ";
|
var shop = "(cx.server.supports.prefix.indexOf('h') > 0) && ";
|
||||||
|
// User is Me or Me is op.
|
||||||
|
var isoporme = "((cx.user == cx.server.me) || cx.channel.iAmOp()) && ";
|
||||||
|
|
||||||
client.menuSpecs["popup:opcommands"] = {
|
client.menuSpecs["popup:opcommands"] = {
|
||||||
label: MSG_MNU_OPCOMMANDS,
|
label: MSG_MNU_OPCOMMANDS,
|
||||||
accesskey: getAccessKeyForMenu('MSG_MNU_OPCOMMANDS'),
|
accesskey: getAccessKeyForMenu('MSG_MNU_OPCOMMANDS'),
|
||||||
items:
|
items:
|
||||||
[
|
[
|
||||||
["op", {visibleif: isop + "!cx.user.isOp"}],
|
["op", {visibleif: isop + "!cx.user.isOp"}],
|
||||||
["deop", {visibleif: isop + "cx.user.isOp"}],
|
["deop", {visibleif: isop + "cx.user.isOp"}],
|
||||||
["hop", {visibleif: isopish + shop + "!cx.user.isHalfOp"}],
|
["hop", {visibleif: isop + "!cx.user.isHalfOp"}],
|
||||||
["dehop", {visibleif: isopish + shop + "cx.user.isHalfOp"}],
|
["dehop", {visibleif: isoporme + "cx.user.isHalfOp"}],
|
||||||
["voice", {visibleif: isopish + "!cx.user.isVoice"}],
|
["voice", {visibleif: isopish + "!cx.user.isVoice"}],
|
||||||
["devoice", {visibleif: isopish + "cx.user.isVoice"}],
|
["devoice", {visibleif: isopish + "cx.user.isVoice"}],
|
||||||
["-"],
|
["-"],
|
||||||
["ban", {enabledif: "(" + isop + "1) || (" + isopish + "!cx.user.isOp)"}],
|
["ban", {enabledif: "(" + isop + "1) || (" + isopish + "!cx.user.isOp)"}],
|
||||||
["unban", {enabledif: "(" + isop + "1) || (" + isopish + "!cx.user.isOp)"}],
|
["unban", {enabledif: "(" + isop + "1) || (" + isopish + "!cx.user.isOp)"}],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user