This commit is contained in:
Luke Rogers 2014-02-14 17:03:08 +13:00
parent 004ceb79fc
commit d6683b32f4
24 changed files with 64 additions and 58 deletions

View file

@ -132,8 +132,8 @@ def factoid(inp, message=None, db=None, bot=None, action=None, conn=None, input=
if data.startswith("<py>"):
code = data[4:].strip()
variables = 'input="""{}"""; nick="{}"; chan="{}"; bot_nick="{}";'.format(arguments.replace('"', '\\"'),
input.nick, input.chan,
input.conn.nick)
input.nick, input.chan,
input.conn.nick)
result = pyexec.eval_py(variables + code)
else:
result = data