MAX_MSG_LEN

This commit is contained in:
Sanj 2012-09-18 17:31:44 +05:30
parent fbc988f64e
commit f9cc696463

View File

@ -105,7 +105,11 @@ class App(AppBase):
msg.respond("Sorry, no direct buses found between %s and %s" % (from_matches['name'], to_matches['name'],))
return
routesFound = ", ".join(intersection)
msg.respond("%s to %s: %s" % (from_matches['name'], to_matches['name'], routesFound,))
response = "%s to %s: %s" % (from_matches['name'], to_matches['name'], routesFound,)
if len(response) > MAX_MSG_LEN:
response = response[0:MAX_MSG_LEN]
msg.respond(response)
#msg.respond("%s to %s: %s" % (from_matches['name'], to_matches['name'], routesFound,))
return