From 4efa325c06fc6166ecfc8014ae4e4a2419896f68 Mon Sep 17 00:00:00 2001 From: "Sean B. Palmer" Date: Thu, 8 Sep 2011 09:50:13 +0100 Subject: [PATCH] Stop phenny from sending messages exceeding the maximum permitted length. --- irc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc.py b/irc.py index 7a4bed4..e6008e0 100755 --- a/irc.py +++ b/irc.py @@ -49,8 +49,8 @@ class Bot(asynchat.async_chat): # print '%r %r %r' % (self, args, text) try: if text is not None: - self.push(' '.join(args) + ' :' + text + '\r\n') - else: self.push(' '.join(args) + '\r\n') + self.push((' '.join(args) + ' :' + text)[:512] + '\r\n') + else: self.push(' '.join(args)[:512] + '\r\n') except IndexError: pass