From 87bad8cac29b480c36ed05b652e5520fd0a1f73c Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 25 Apr 2011 19:32:19 +0200 Subject: quotes: Return three quotes instead of two and leftovers when there is exactly three quotes. Signed-off-by: Vegard Storheil Eriksen --- modules/quotes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/quotes.py b/modules/quotes.py index cf3c794..bea34e3 100644 --- a/modules/quotes.py +++ b/modules/quotes.py @@ -112,9 +112,9 @@ class IRCHandler(Quotes): results = Quotes.find(self, args, func) leftovers = [] if len(results) > 1: - yield 'Quote: Found \002%d\002 results for "%s"%s' % (len(results), args, ', here are the last two:' if len(results) > 2 else ':' if len(results) else '') + yield 'Quote: Found \002%d\002 results for "%s"%s' % (len(results), args, ', here are the last two:' if len(results) > 3 else ':' if len(results) else '') if len(results): - if len(results) > 2: + if len(results) > 3: leftovers, results = results[:-2], results[-2:] for l in self.output(results): yield l -- cgit v1.2.3