From c99f68894a4595e63d08cf45a0088d3e691af051 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 18 Apr 2003 08:19:22 +0000 Subject: [PATCH] Changed to use ircutils.shrinkList. --- plugins/Notes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Notes.py b/plugins/Notes.py index a70741b10..7daa1198f 100644 --- a/plugins/Notes.py +++ b/plugins/Notes.py @@ -227,11 +227,11 @@ class Notes(callbacks.Privmsg): L.append(r'#%s from %s' % (id, sender)) else: L.append(r'#%s (private)' % id) - while reduce(operator.add, map(len, L)) + 2*len(L) > 400: - L.pop() - more = True if more: + shrinkList(L, ', ', 400) L.append('and even more notes.') + else: + shrinkList(L, ', ', 450) irc.reply(msg, ', '.join(L))