revert sieve to version without broken caching
This commit is contained in:
parent
9d139d8760
commit
51e24dadb5
|
@ -14,8 +14,6 @@ def sieve_suite(bot, input, func, args):
|
||||||
if input.nick.lower()[-3:] == 'bot' and args.get('ignorebots', True):
|
if input.nick.lower()[-3:] == 'bot' and args.get('ignorebots', True):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
regex = args.get('re')
|
|
||||||
if not regex:
|
|
||||||
hook = args.get('hook', r'(.*)')
|
hook = args.get('hook', r'(.*)')
|
||||||
|
|
||||||
if args.get('prefix', True):
|
if args.get('prefix', True):
|
||||||
|
@ -25,10 +23,7 @@ def sieve_suite(bot, input, func, args):
|
||||||
prefix = r'^(?:[.!]|'
|
prefix = r'^(?:[.!]|'
|
||||||
hook = prefix + input.conn.nick + r'[:,]*\s)' + hook
|
hook = prefix + input.conn.nick + r'[:,]*\s)' + hook
|
||||||
|
|
||||||
regex = re.compile(hook, flags=re.I)
|
input.re = re.match(hook, input.msg, flags=re.I)
|
||||||
args['re'] = regex
|
|
||||||
|
|
||||||
input.re = regex.match(input.msg)
|
|
||||||
if input.re is None:
|
if input.re is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue