Sat May 14 01:44:48 ART 2005  Alberto Bertogli <albertogli@telpin.com.ar>
  * Don't allow lines longer than 1500 chars.
  As the max length for a message is 1500, never allow lines longer than that.
  Yes, it wastes a couple of bytes for the "m friend " or "r " beginning, but
  if you're writing a message _that_ long, a couple of bytes won't make a
  difference.
diff -rN -u old-msnlib/msn new-msnlib/msn
--- old-msnlib/msn	2005-05-27 13:09:29.000000000 -0300
+++ new-msnlib/msn	2005-05-27 13:09:30.000000000 -0300
@@ -794,7 +794,18 @@
 
 		else:						# normal
 			if not in_esc:
-				redraw_cli_cond(char)
+				# Never allow lines longer than 1500, since
+				# that's the max for a single message.
+				# Actually this calculates based on the whole
+				# buffer and not on just the message, but the
+				# code is nicer and 16 bytes won't make a
+				# difference.
+				if len(inbuf) > 1500:
+					inbuf = inbuf[:1500]
+					beep()
+					redraw_cli()
+				else:
+					redraw_cli_cond(char)
 				continue
 
 			# comes from a escape code

