Fix to line length limit code.
parent
4efa325c06
commit
27d80498d3
5
irc.py
5
irc.py
|
@ -49,8 +49,9 @@ class Bot(asynchat.async_chat):
|
||||||
# print '%r %r %r' % (self, args, text)
|
# print '%r %r %r' % (self, args, text)
|
||||||
try:
|
try:
|
||||||
if text is not None:
|
if text is not None:
|
||||||
self.push((' '.join(args) + ' :' + text)[:512] + '\r\n')
|
# 510 because CR and LF count too, as nyuszika7h points out
|
||||||
else: self.push(' '.join(args)[:512] + '\r\n')
|
self.push((' '.join(args) + ' :' + text)[:510] + '\r\n')
|
||||||
|
else: self.push(' '.join(args)[:510] + '\r\n')
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue