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 = """
|
||||
import sys
|
||||
result = eval(sys.stdin.read())
|
||||
print("")
|
||||
if not result == None:
|
||||
sys.stdout.write(str(result))
|
||||
"""
|
||||
|
@ -28,7 +29,7 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
if page:
|
||||
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:
|
||||
event["stderr"].write("%s: failed to eval" % event["user"].nickname)
|
||||
|
||||
|
|
Loading…
Reference in a new issue