mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
test regexp for validity before adding it.
This commit is contained in:
parent
f9cc5d5663
commit
e2d16cb3a7
@ -167,6 +167,11 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler):
|
||||
locked = 0
|
||||
usage_count = 0
|
||||
if not locked:
|
||||
try:
|
||||
re.compile(regexp)
|
||||
except Exception, e:
|
||||
irc.error('Invalid python regexp: %s' % (e,))
|
||||
return
|
||||
if ircdb.users.hasUser(msg.prefix):
|
||||
name = ircdb.users.getUser(msg.prefix).name
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user