mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Added fix for possible bug in re.finditer.
This commit is contained in:
parent
9f24c13be8
commit
bbbc97c11b
@ -686,7 +686,13 @@ class PrivmsgRegexp(Privmsg):
|
||||
return
|
||||
fed = False
|
||||
for (r, method) in self.res:
|
||||
spans = sets.Set()
|
||||
for m in r.finditer(msg.args[1]):
|
||||
# There's a bug in finditer: http://www.python.org/sf/817234
|
||||
if m.span() in spans:
|
||||
break
|
||||
else:
|
||||
spans.add(m.span())
|
||||
if not fed:
|
||||
fed = True
|
||||
self.rateLimiter.put(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user