From: Christian Heller Date: Sun, 24 Jan 2016 09:37:46 +0000 (+0100) Subject: Fix crash when just commanding "!quote". X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/conditions?a=commitdiff_plain;h=60133e10b2df0c671574e294e835d39b8cbf23a2;p=plomlombot-irc.git Fix crash when just commanding "!quote". --- 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:")