mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-02 08:21:10 -05:00
OperUp: disallow nesting
This commit is contained in:
parent
a42b9d8541
commit
480c89e39f
@ -94,6 +94,8 @@ class OperUp(callbacks.Plugin):
|
|||||||
"""takes no arguments.
|
"""takes no arguments.
|
||||||
Makes the bot Oper up using the name and password defined in config.
|
Makes the bot Oper up using the name and password defined in config.
|
||||||
"""
|
"""
|
||||||
|
if irc.nested:
|
||||||
|
irc.error("This command cannot be nested.", Raise=True)
|
||||||
if irc.network in self.registryValue('operNets'):
|
if irc.network in self.registryValue('operNets'):
|
||||||
if self.registryValue("operName") and \
|
if self.registryValue("operName") and \
|
||||||
self.registryValue("operPass"):
|
self.registryValue("operPass"):
|
||||||
@ -114,6 +116,8 @@ class OperUp(callbacks.Plugin):
|
|||||||
"""takes no arguments.
|
"""takes no arguments.
|
||||||
Makes the bot deoper by setting user modes -Oo on itself.
|
Makes the bot deoper by setting user modes -Oo on itself.
|
||||||
"""
|
"""
|
||||||
|
if irc.nested:
|
||||||
|
irc.error("This command cannot be nested.", Raise=True)
|
||||||
irc.sendMsg(ircmsgs.mode(irc.nick, "-Oo"))
|
irc.sendMsg(ircmsgs.mode(irc.nick, "-Oo"))
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
deoper = wrap(deoper, ['owner'])
|
deoper = wrap(deoper, ['owner'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user