From e378b34138a2eadbea7811fd185fa49a7372de67 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 26 Oct 2004 18:54:03 +0000 Subject: [PATCH] Added a configurable more length. --- src/callbacks.py | 5 ++++- src/conf.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/callbacks.py b/src/callbacks.py index d97e0c82f..8618aee07 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -805,7 +805,10 @@ class IrcObjectProxy(RichReplyMethods): self.irc.queueMsg(m) return m else: - allowedLength = 450 - len(self.irc.prefix) + allowedLength = conf.get(conf.supybot.reply.mores.length, + target) + if not allowedLength: # 0 indicates this. + allowedLength = 450 - len(self.irc.prefix) maximumMores = conf.get(conf.supybot.reply.mores.maximum, target) maximumLength = allowedLength * maximumMores diff --git a/src/conf.py b/src/conf.py index c31b6bffd..d1fa9621b 100644 --- a/src/conf.py +++ b/src/conf.py @@ -286,6 +286,11 @@ registerChannelValue(supybot.reply.mores, 'maximum', registry.PositiveInteger(50, """Determines what the maximum number of chunks (for use with the 'more' command) will be.""")) +registerChannelValue(supybot.reply.mores, 'length', + registry.NonNegativeInteger(0, """Determines how long individual chunks + will be. If set to 0, uses our super-tweaked, + get-the-most-out-of-an-individual-message default.""")) + registerChannelValue(supybot.reply.mores, 'instant', registry.PositiveInteger(1, """Determines how many mores will be sent instantly (i.e., without the use of the more command, immediately when