From bacbf5338617fbc91a807efceaa94683b7e2e1e0 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 20 Apr 2003 09:20:49 +0000 Subject: [PATCH] Lowered the default values for limit on shrinkList and privmsgPayload. --- src/ircutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ircutils.py b/src/ircutils.py index 521551466..30cbc7445 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -204,7 +204,7 @@ def replyTo(msg): else: return msg.nick -def privmsgPayload(L, sep, limit=450): +def privmsgPayload(L, sep, limit=425): """Returns a valid privmsg payload given a list of strings and a separator. Items are popped from the back of the list until the payload is small @@ -213,7 +213,7 @@ def privmsgPayload(L, sep, limit=450): shrinkList(L, sep, limit) return sep.join(L) -def shrinkList(L, sep='', limit=450): +def shrinkList(L, sep='', limit=425): """Shrinks a list of strings to a given combined length of limit.""" length = len(sep) while reduce(operator.add, map(length.__add__, map(len, L)), 0)> limit: