home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b8009d0
)
Only show first 3 of >3 quotes, fix broken multi-quote printing.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 18 Apr 2016 00:17:13 +0000
(
02:17
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 18 Apr 2016 00:17:13 +0000
(
02:17
+0200)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index 66b902f672e978ad0ff5e01961c7fdd94e5e196a..7224b29e2ccff2a90504a113676edd625278253e 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-180,9
+180,11
@@
def handle_command(command, argument, notice, target, session):
if len(results) == 0:
notice("NO QUOTES MATCHING QUERY")
else:
- for result in results:
- notice("QUOTE #" + str(result[0] + 1) + " : "
- + result[1][-1])
+ if len(results) > 3:
+ notice("SHOWING 3 OF " + str(len(results)) + " QUOTES")
+ for result in results[:3]:
+ notice("QUOTE #" + str(result[0] + 1) + ": "
+ + result[1][:-1])
return
else:
i = random.randrange(len(lines))