Fix previous commit (38bab185a9).

This commit is contained in:
Valentin Lorentz 2013-07-13 20:39:38 +02:00
parent 38bab185a9
commit 8496cc2e6a

View File

@ -46,6 +46,12 @@ except:
_ = lambda x:x _ = lambda x:x
internationalizeDocstring = lambda x:x internationalizeDocstring = lambda x:x
if isinstance(__builtins__, dict):
_any = __builtins__['any']
_all = __builtins__['all']
else:
_any = __builtins__.any
_all = __builtins__.all
class Conditional(callbacks.Plugin): class Conditional(callbacks.Plugin):
"""Add the help for "@plugin help Conditional" here """Add the help for "@plugin help Conditional" here
@ -85,7 +91,7 @@ class Conditional(callbacks.Plugin):
Returns true if all conditions supplied evaluate to true. Returns true if all conditions supplied evaluate to true.
""" """
if __builtins__.all(conds): if _all(conds):
irc.reply("true") irc.reply("true")
else: else:
irc.reply("false") irc.reply("false")
@ -97,7 +103,7 @@ class Conditional(callbacks.Plugin):
Returns true if any one of conditions supplied evaluates to true. Returns true if any one of conditions supplied evaluates to true.
""" """
if __builtins__.any(conds): if _any(conds):
irc.reply("true") irc.reply("true")
else: else:
irc.reply("false") irc.reply("false")