14 Commits

Author SHA1 Message Date
James Lu
8e4b6ba928 SedRegex: make the regexp process timeout configurable
Although the default has been adequate on my systems, busy or low-powered machines may fail to process regexps quickly enough and cause SedRegex to sporadically error.

Reported by @cottongin via IRC.

(cherry picked from commit 51ff41251b7367f4c056745b18758006c7453ff5)
2018-02-01 19:39:51 -08:00
James Lu
0ef8138ab3 SedRegex: bump copyright year to 2017 2017-01-16 21:15:58 -08:00
James Lu
926454b01d SedRegex: fix some replacement queries not working 2017-01-04 20:36:45 -08:00
James Lu
e137d29eb9 SedRegex: also catch errors in the regexp_wrapper() step
E.g. sre_constants.error: invalid group reference
2016-12-26 08:05:06 -08:00
James Lu
406d7b1790 SedRegex: log the exact error name instead of "SedRegex error" 2016-12-26 08:04:20 -08:00
James Lu
414a4a4a16 SedRegex: require ending delimiter to prevent overzealous matching of replacement text
Closes #59.
2016-12-22 12:12:21 -08:00
James Lu
244a8c6bee SedRegex: work around "nothing to replace" errors on < Python 2.7.6 again 2016-12-22 12:05:00 -08:00
James Lu
db125ee5d1 SedRegex: fix flag matching 2016-12-17 21:12:36 -08:00
James Lu
87c79db3d0 SedRegex: implement 's' regex flag to only match the caller's message 2016-12-17 20:49:16 -08:00
James Lu
423da9f996 SedRegex: allow free form flags and return them in _unpack_sed() 2016-12-17 20:49:16 -08:00
James Lu
48445e256a SedRegex: sanitize against \n\r\t in output 2016-09-10 17:29:47 -07:00
James Lu
84b94d589c SedRegex: only operate on messages from the current network
Reported by @jztech101.

The 'receivedBy' tag is now checked to match the current IRC object, which Works around ProgVal/Limnoria#1211.
2016-07-20 12:48:15 -07:00
James Lu
335fc6e3da SedRegex: work around "nothing to repeat" errors on Python < 2.7.6
Source: https://stackoverflow.com/questions/3675144/regex-error-nothing-to-repeat and https://bugs.python.org/issue18647
2016-07-15 23:44:25 -07:00
James Lu
2a556a1b84 Rename Replacer->SedRegex (Closes #51) 2016-05-06 21:19:28 -07:00