- if len(tokens) > 2 or \
- (len(tokens) == 2 and not tokens[1].isdigit()):
- notice("SYNTAX: !quote [int]")
+ if (len(tokens) > 2 and tokens[1] != "search") or \
+ (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:")
+ notice("!quote search foo")
+ notice("!quote search foo AND (bar OR NOT baz)")
+ notice("!quote search \"foo\\\"bar\" AND "\
+ + "('NOT\"' AND \"'foo'\" OR 'bar\\'baz')")