mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Changed to use ircutils.shrinkList.
This commit is contained in:
parent
7fa59b0f35
commit
c99f68894a
@ -227,11 +227,11 @@ class Notes(callbacks.Privmsg):
|
|||||||
L.append(r'#%s from %s' % (id, sender))
|
L.append(r'#%s from %s' % (id, sender))
|
||||||
else:
|
else:
|
||||||
L.append(r'#%s (private)' % id)
|
L.append(r'#%s (private)' % id)
|
||||||
while reduce(operator.add, map(len, L)) + 2*len(L) > 400:
|
|
||||||
L.pop()
|
|
||||||
more = True
|
|
||||||
if more:
|
if more:
|
||||||
|
shrinkList(L, ', ', 400)
|
||||||
L.append('and even more notes.')
|
L.append('and even more notes.')
|
||||||
|
else:
|
||||||
|
shrinkList(L, ', ', 450)
|
||||||
irc.reply(msg, ', '.join(L))
|
irc.reply(msg, ', '.join(L))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user