mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
adding buddy detection, sanitize urls for urlbot
This commit is contained in:
16
plugins.py
16
plugins.py
@@ -978,6 +978,22 @@ def recognize_bots(**args):
|
||||
'msg': 'Making notes...'
|
||||
}
|
||||
}
|
||||
elif 'I\'ll be back' in args['data']:
|
||||
# a buddy!
|
||||
blob = conf_load()
|
||||
|
||||
if 'other_bots' not in blob:
|
||||
blob['other_bots'] = []
|
||||
if args['reply_user'] not in blob['other_bots']:
|
||||
blob['other_bots'].append(args['reply_user'])
|
||||
conf_save(blob)
|
||||
return {
|
||||
'event': {
|
||||
'time': time.time() + 3,
|
||||
'msg': 'Hey there, buddy!'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@pluginfunction("set_status", "set bot status", ptypes_COMMAND)
|
||||
|
||||
Reference in New Issue
Block a user