mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
spammer: add show_triggers and add_trigger admin commands
This commit is contained in:
parent
59bba00130
commit
e387fa67ab
1 changed files with 20 additions and 0 deletions
|
@ -67,6 +67,12 @@ def OnMessage(event,*args,**kwargs):
|
||||||
Ban(link)
|
Ban(link)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def AddTrigger(link,cmd):
|
||||||
|
triggers.append(" ".join(cmd[1:]))
|
||||||
|
|
||||||
|
def ShowTriggers(link,cmd):
|
||||||
|
link.send(", ".join(triggers))
|
||||||
|
|
||||||
def Help(link):
|
def Help(link):
|
||||||
link.send_private('Ban assholes')
|
link.send_private('Ban assholes')
|
||||||
|
|
||||||
|
@ -85,3 +91,17 @@ RegisterEventHandler({
|
||||||
'event': 'message',
|
'event': 'message',
|
||||||
'function': OnMessage,
|
'function': OnMessage,
|
||||||
})
|
})
|
||||||
|
RegisterCommand({
|
||||||
|
'module': __name__,
|
||||||
|
'name': 'add_trigger',
|
||||||
|
'function': AddTrigger,
|
||||||
|
'admin': True,
|
||||||
|
'help': "add keyword trigger to spammer trap"
|
||||||
|
})
|
||||||
|
RegisterCommand({
|
||||||
|
'module': __name__,
|
||||||
|
'name': 'show_triggers',
|
||||||
|
'function': ShowTriggers,
|
||||||
|
'admin': True,
|
||||||
|
'help': "list keyword triggers"
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue