1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

conf foo, setting the jid to sth with the botclass, presence support (doesn't work in MUC)

This commit is contained in:
Thorsten
2015-11-28 13:11:22 +01:00
parent 88d43f9df1
commit 277f4564a2
4 changed files with 40 additions and 16 deletions

View File

@@ -983,21 +983,21 @@ def recognize_bots(**args):
}
@pluginfunction("set_status", "", ptypes_COMMAND)
@pluginfunction("set_status", "set bot status", ptypes_COMMAND)
def set_status(argv, **args):
if 'set_status' != argv[0]:
return
if argv[1] == 'mute' and args['reply_user'] == conf('bot_owner'):
return {
'presence': {
'status': 'AWAY',
'status': 'xa',
'message': 'I\'m muted now. You can unmute me with "%s: set_status unmute"' % conf("bot_user")
}
}
elif argv[1] == 'unmute' and args['reply_user'] == conf('bot_owner'):
return {
'presence': {
'status': 'ONLINE',
'status': None,
'message': ''
}
}