From 480c89e39fb6751d866a04a9cdaf735fc80b6764 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 11 Feb 2014 19:17:22 -0800 Subject: [PATCH] OperUp: disallow nesting --- OperUp/plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OperUp/plugin.py b/OperUp/plugin.py index 23a272a..1e68b5e 100644 --- a/OperUp/plugin.py +++ b/OperUp/plugin.py @@ -94,6 +94,8 @@ class OperUp(callbacks.Plugin): """takes no arguments. 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 self.registryValue("operName") and \ self.registryValue("operPass"): @@ -114,6 +116,8 @@ class OperUp(callbacks.Plugin): """takes no arguments. 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.replySuccess() deoper = wrap(deoper, ['owner'])