From 60133e10b2df0c671574e294e835d39b8cbf23a2 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 24 Jan 2016 10:37:46 +0100 Subject: [PATCH] Fix crash when just commanding "!quote". --- plomlombot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plomlombot.py b/plomlombot.py index c32b6dd..fe9c6d8 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -169,8 +169,8 @@ def lineparser_loop(io, nickname): notice("ADDED QUOTE #" + str(len(lines) - 1)) elif tokens[0] == "quote": if (len(tokens) > 2 and tokens[1] != "search") or \ - (len(tokens) < 3 and tokens[1] == "search") or \ - (len(tokens) == 2 and not tokens[1].isdigit()): + (len(tokens) == 2 and + (tokens[1] == "search" or not tokens[1].isdigit())): notice("SYNTAX: !quote [int] OR !quote search QUERY") notice("QUERY may be a boolean grouping of quoted or "\ + "unquoted search terms, examples:") -- 2.30.2