Skip to content

Commit

Permalink
Fix to line length limit code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean B. Palmer committed Nov 15, 2011
1 parent 4efa325 commit 27d8049
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ def __write(self, args, text=None):
# 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

Expand Down

0 comments on commit 27d8049

Please sign in to comment.