author | Alberto Bertogli
<albertogli@telpin.com.ar> 2005-05-14 04:44:48 UTC |
committer | Alberto Bertogli
<albertogli@telpin.com.ar> 2005-05-14 04:44:48 UTC |
parent | 3b428eb87bf0427f778c2e6d236e4ba522f273c1 |
msn | +12 | -1 |
diff --git a/msn b/msn index 923c238..d6840b4 100644 --- a/msn +++ b/msn @@ -794,7 +794,18 @@ def stdin_read(): 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