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:
silver%warwickcompsoc.co.uk 2009-06-09 14:10:04 +00:00
parent 4bd615d446
commit cff87b44fb

View File

@ -314,6 +314,8 @@ function initMenus()
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,
@ -322,8 +324,8 @@ function initMenus()
[ [
["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"}],
["-"], ["-"],