Limit the number of mores to 50.

This commit is contained in:
Jeremy Fincher 2003-12-03 05:42:55 +00:00
parent 902ff30dd4
commit 8e7416fd72

View File

@ -427,6 +427,9 @@ class IrcObjectProxy:
else:
s = ircutils.safeArgument(s)
allowedLength = 450 - len(self.irc.prefix)
if len(s) > allowedLength*50:
log.warning('Cowardly refusing to "more" %s bytes.'%len(s))
s = s[:allowedLength*50]
msgs = textwrap.wrap(s, allowedLength-30) # -30 is for "nick:"
msgs.reverse()
response = msgs.pop()