Closes: Sf#3165718
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 01c8dc7f78)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This is the only way to limit the execution time of a possibly long-running python statement.
Use this on String.re, due to the possibility of pathologically long re matching in python.
This allows us to remove the 'trusted-only' restriction on string.re.
In the future, this should probably be used in other places that take user-supplied regexps,
such as 'misc last --regexp', for example, as well as other potentially long-running tasks
that can block the bot.
Certain encode functions, like base64, add a trailing \n which simply clutters
the response for Supybot.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>