spammer: triggers don't have to be lowercase anymore

Also add "allah is doing"
This commit is contained in:
moneromooo 2016-08-18 22:24:04 +01:00
parent 97b43c5af3
commit 29f6f1fdaa
1 changed files with 8 additions and 5 deletions

View File

@ -44,6 +44,13 @@ def OnUserJoined(event,*args,**kwargs):
if nick=="lbft" or nick=="lbft_":
Ban(link)
triggers=[l.lower() for l in [
"astounding!", "triple your btc", "pm me to begin", "hatt uu",
"accelerate the blockchain", "u stappid", "me a message to begin",
"the ops have confirmed", "expanding technology", "exploding technology",
"allah is doing"
]]
def OnMessage(event,*args,**kwargs):
line=kwargs['message']
if not line:
@ -54,11 +61,7 @@ def OnMessage(event,*args,**kwargs):
line=line.lower().strip()
log_info("Testing: " + line)
for expr in [
"astounding!", "triple your btc", "pm me to begin", "hatt uu",
"accelerate the blockchain", "u stappid", "me a message to begin",
"the ops have confirmed", "expanding technology", "exploding technology"
]:
for expr in triggers:
if re.match(".*"+expr+".*",line):
link=kwargs['link']
Ban(link)