revert sieve to version without broken caching
This commit is contained in:
parent
9d139d8760
commit
51e24dadb5
|
@ -14,21 +14,16 @@ def sieve_suite(bot, input, func, args):
|
|||
if input.nick.lower()[-3:] == 'bot' and args.get('ignorebots', True):
|
||||
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 input.chan == input.nick: # private message, prefix not required
|
||||
prefix = r'^(?:[.!]?|'
|
||||
else:
|
||||
prefix = r'^(?:[.!]|'
|
||||
hook = prefix + input.conn.nick + r'[:,]*\s)' + hook
|
||||
if args.get('prefix', True):
|
||||
if input.chan == input.nick: # private message, prefix not required
|
||||
prefix = r'^(?:[.!]?|'
|
||||
else:
|
||||
prefix = r'^(?:[.!]|'
|
||||
hook = prefix + input.conn.nick + r'[:,]*\s)' + hook
|
||||
|
||||
regex = re.compile(hook, flags=re.I)
|
||||
args['re'] = regex
|
||||
|
||||
input.re = regex.match(input.msg)
|
||||
input.re = re.match(hook, input.msg, flags=re.I)
|
||||
if input.re is None:
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue