adjust local_config from urlbot-mcabber/

This commit is contained in:
urlbot
2014-12-02 13:31:46 +01:00
parent 5a6848f9be
commit 8e93cb0a17
2 changed files with 46 additions and 10 deletions

4
bot.py
View File

@@ -18,7 +18,7 @@ def message_handler(connect_object, message_node):
if not type(msg_body) in [str, unicode]:
return None
if msg_body.startswith(conf('nick')):
if msg_body.startswith(conf('bot_user')):
connect_object.send(
xmpp.protocol.Message(
to=conf('room'),
@@ -41,7 +41,7 @@ client.connect()
client.auth(jid.getNode(), conf('password'))
client.RegisterHandler('message', message_handler)
client.send(xmpp.Presence(to=(conf('room') + '/' + conf('nick'))))
client.send(xmpp.Presence(to=(conf('room') + '/' + conf('bot_user'))))
while (t + time.time()) < 30:
client.Process(1)