From 8e7416fd7202b4b171345c8c8a8a6f1f93111590 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 3 Dec 2003 05:42:55 +0000 Subject: [PATCH] Limit the number of mores to 50. --- src/callbacks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/callbacks.py b/src/callbacks.py index 31a82db67..0676daf9f 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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()