From c17623bcf697cc77edd8b31d1ca11ca82f04398e Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Wed, 2 Mar 2011 16:17:59 -0600 Subject: [PATCH] Karma: in the element regex, match ()ful version before ()less version the motivation here is doing (foo)++ would match \S+ first, adding (foo) to the karma database (rather than foo, which is probably what the user meant) --- modules/Karma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Karma.py b/modules/Karma.py index 8b3c921..07647c0 100644 --- a/modules/Karma.py +++ b/modules/Karma.py @@ -34,7 +34,7 @@ class Karma(Module): Module.__init__(self, irc, config, server) - pattern = "(?:(\S+)|\((.+)\))" + pattern = "(?:\((.+)\)|(\S+))" karmapattern = pattern + '(\+\+|--|\+-|-\+)' + '(\s+|$)' querypattern = '^!rank\s+(.*)' reportpattern = '^!karma\s+report\s+(highest|lowest|positive|negative|top)'