require whitespace or end of line after increment/decrement

this is to avoid stuff like http://somegross/url--more/garbage as being
a decrement of http://somegross/url
This commit is contained in:
Brian S. Stephan 2010-11-17 10:25:49 -06:00
parent 8cc411956e
commit 526d553220

View File

@ -34,7 +34,7 @@ class Karma(Module):
Module.__init__(self, config, server, modlist)
pattern = "(?:(\S+)|\((.+)\))"
karmapattern = pattern + '(\+\+|--)'
karmapattern = pattern + '(\+\+|--)' + '(\s+|$)'
querypattern = '^rank\s+(.*)'
self.karmare = re.compile(karmapattern)