Add a \n between potential prints in eval() and printing the return from eval so
that bitbot will only show one of them
This commit is contained in:
parent
b884b0e170
commit
4700402db4
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ from src import ModuleManager, utils
|
||||||
EVAL_TEMPLATE = """
|
EVAL_TEMPLATE = """
|
||||||
import sys
|
import sys
|
||||||
result = eval(sys.stdin.read())
|
result = eval(sys.stdin.read())
|
||||||
|
print("")
|
||||||
if not result == None:
|
if not result == None:
|
||||||
sys.stdout.write(str(result))
|
sys.stdout.write(str(result))
|
||||||
"""
|
"""
|
||||||
|
@ -28,7 +29,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
if page:
|
if page:
|
||||||
event["stdout"].write("%s: %s" % (event["user"].nickname,
|
event["stdout"].write("%s: %s" % (event["user"].nickname,
|
||||||
page.split("</b></span><br>", 1)[1]))
|
page.split("</b></span><br>", 1)[1].strip("\n")))
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("%s: failed to eval" % event["user"].nickname)
|
event["stderr"].write("%s: failed to eval" % event["user"].nickname)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue