Added logging of the regexp and originator, in case of abuse.

This commit is contained in:
Jeremy Fincher 2003-12-01 11:17:00 +00:00
parent fb2d9b7f4f
commit cada17ebb3
1 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,11 @@ class Utilities(callbacks.Privmsg):
regexp to <text>
"""
(regexp, text) = privmsgs.getArgs(args, required=2)
self.log.info('re command called with regexp %r from %s' %
(regexp, msg.prefix))
if len(regexp) > 512:
irc.error(msg, 'Your regexp is just plain too long.')
return
f = None
try:
r = utils.perlReToPythonRe(regexp)