mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-05-13 18:07:25 +02:00
Limit the number of mores to 50.
This commit is contained in:
parent
902ff30dd4
commit
8e7416fd72
@ -427,6 +427,9 @@ class IrcObjectProxy:
|
|||||||
else:
|
else:
|
||||||
s = ircutils.safeArgument(s)
|
s = ircutils.safeArgument(s)
|
||||||
allowedLength = 450 - len(self.irc.prefix)
|
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 = textwrap.wrap(s, allowedLength-30) # -30 is for "nick:"
|
||||||
msgs.reverse()
|
msgs.reverse()
|
||||||
response = msgs.pop()
|
response = msgs.pop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user