diff options
author | Sean B. Palmer <sbp@aldebaran.local> | 2011-11-15 13:56:43 +0000 |
---|---|---|
committer | Sean B. Palmer <sbp@aldebaran.local> | 2011-11-15 13:56:43 +0000 |
commit | 27d80498d30d8de84fff82fab363b0bc1ad5c116 (patch) | |
tree | 235d3c6f3ced66aae4f594ecb7ec1795ee0480c8 | |
parent | 4efa325c06fc6166ecfc8014ae4e4a2419896f68 (diff) | |
download | bot-27d80498d30d8de84fff82fab363b0bc1ad5c116.tar.gz bot-27d80498d30d8de84fff82fab363b0bc1ad5c116.tar.bz2 bot-27d80498d30d8de84fff82fab363b0bc1ad5c116.zip |
Fix to line length limit code.
-rwxr-xr-x | irc.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -49,8 +49,9 @@ class Bot(asynchat.async_chat): # print '%r %r %r' % (self, args, text) try: if text is not None: - self.push((' '.join(args) + ' :' + text)[:512] + '\r\n') - else: self.push(' '.join(args)[:512] + '\r\n') + # 510 because CR and LF count too, as nyuszika7h points out + self.push((' '.join(args) + ' :' + text)[:510] + '\r\n') + else: self.push(' '.join(args)[:510] + '\r\n') except IndexError: pass |