[pybot-commits] CVS: pybot/pybot/modules eval.py,1.8,1.9
Brought to you by:
niemeyer
From: Gustavo N. <nie...@us...> - 2003-08-29 15:10:27
|
Update of /cvsroot/pybot/pybot/pybot/modules In directory sc8-pr-cvs1:/tmp/cvs-serv29561 Modified Files: eval.py Log Message: Fixed answering with lists. Index: eval.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/eval.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** eval.py 29 Aug 2003 01:46:43 -0000 1.8 --- eval.py 29 Aug 2003 15:10:01 -0000 1.9 *************** *** 23,26 **** --- 23,27 ---- import math import os + from types import StringType HELP = """ *************** *** 166,171 **** elif len(answer) > MAXCHARS: msg.answer("%:", "Your answer is too long", [".", "!"]) ! else: msg.answer("%:", answer.translate(TRANSTABLE)) def message(self, msg): --- 167,174 ---- elif len(answer) > MAXCHARS: msg.answer("%:", "Your answer is too long", [".", "!"]) ! elif type(answer) is StringType: msg.answer("%:", answer.translate(TRANSTABLE)) + else: + msg.answer("%:", answer) def message(self, msg): |