Truncate messages if they are longer than 255 characters. Note that this is

not really a good solution for default input strings...
This commit is contained in:
Jack Jansen 1998-09-28 10:37:08 +00:00
parent a5a018fbd4
commit d5af7bd489
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ def cr2lf(text):
def lf2cr(text): def lf2cr(text):
if '\n' in text: if '\n' in text:
text = string.join(string.split(text, '\n'), '\r') text = string.join(string.split(text, '\n'), '\r')
if len(text) > 253:
text = text[:253] + '\311'
return text return text
def Message(msg, id=256): def Message(msg, id=256):