From 79a7fd832db10a1bf45d58c6f07f03ef0a05240f Mon Sep 17 00:00:00 2001 From: Maurizio Porrato Date: Sat, 4 Sep 2010 16:48:19 +0200 Subject: [PATCH] Add long message splitting in crosslink --- twisted/plugins/frncrosslink.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/twisted/plugins/frncrosslink.py b/twisted/plugins/frncrosslink.py index f40b9c8..9dc8cf9 100755 --- a/twisted/plugins/frncrosslink.py +++ b/twisted/plugins/frncrosslink.py @@ -61,8 +61,11 @@ class FRNCrosslinkClient(FRNClient): ss, c['on'], )) - reply = '
'.join(cl) - self.sendTextMessage(client, reply) + sm = [cl[i*15:(i+1)*15] + for i in range((len(cl)+14)/15)] + for m in sm: + reply = '
'.join(m) + self.sendTextMessage(client, reply) def decodeTX(self, my_id): log.msg("Got TX ack for %s" % self.user.ON)