X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/366accf8841d7d1707a75ceb208dd993e9ebc0c5..56580e4e6b07ddb00b7046e77dc007626ce130fb:/modules/subtext.py diff --git a/modules/subtext.py b/modules/subtext.py index 2a87c0e..ca23ec7 100644 --- a/modules/subtext.py +++ b/modules/subtext.py @@ -2,7 +2,6 @@ # vim: fileencoding=utf-8 # module for 's/regex/replacement/' style correction # warning: arbitrary regex's are generally capable of various DoS attacks on CPU/memory usage. use with caution. -# see for usage examples: https://github.com/zonidjan/erebus/commit/d7e9802778477f1faa26a03078cb1b3c018a5e5c # This file is released into the public domain; see http://unlicense.org/ # module info @@ -23,7 +22,7 @@ modstop = lib.modstop # module code import re from collections import namedtuple -re_findsub = re.compile(r"""s([/'";:!@#$%^&-_=`~])(?P.+?)\1(?P.+?)(?:\1(?Pg)?|$)""") +re_findsub = re.compile(r"""s([/'";:!@#$%^&-_=`~])(?P.+?)\1(?P.*?)(?:\1(?Pg)?|$)""") Line = namedtuple('Line', ['sender', 'msg']) lastline = {} @lib.hooknum("PRIVMSG")