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'])