remove sieve.py from core, it doesn't work at all
This commit is contained in:
parent
1e9e844f86
commit
b6ca89e079
|
@ -1,29 +0,0 @@
|
||||||
import re
|
|
||||||
|
|
||||||
import hook
|
|
||||||
|
|
||||||
|
|
||||||
@hook.sieve
|
|
||||||
def sieve_suite(bot, input, func, args):
|
|
||||||
events = args.get('events', ['PRIVMSG'])
|
|
||||||
|
|
||||||
if input.command not in events and events != '*':
|
|
||||||
return None
|
|
||||||
|
|
||||||
if input.nick.lower()[-3:] == 'bot' and args.get('ignorebots', True):
|
|
||||||
return None
|
|
||||||
|
|
||||||
hook = args.get('hook', r'(.*)')
|
|
||||||
args.setdefault('prefix', True)
|
|
||||||
|
|
||||||
if args.get('prefix', True):
|
|
||||||
hook = (r'^(?:[.!]|' if input.chan != input.nick else r'^(?:[.!]?|') \
|
|
||||||
+ bot.nick +r'[:,]*\s*)' + hook
|
|
||||||
|
|
||||||
input.re = re.match(hook, input.msg, flags=re.I)
|
|
||||||
if input.re is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
input.inp = ' '.join(input.re.groups())
|
|
||||||
|
|
||||||
return input
|
|
Loading…
Reference in New Issue