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

cleanup; use a more reasonable config{} definition method

This commit is contained in:
urlbot
2014-12-01 11:59:29 +01:00
parent 397fc4730c
commit 94aaa824f1
2 changed files with 7 additions and 15 deletions

10
bot.py
View File

@@ -26,7 +26,6 @@ def message_handler(connect_object, message_node):
typ='groupchat'
)
)
# send_msg('hello %s!' % msg_from)
try:
print '%20s: %s' %(msg_from, msg_body)
@@ -44,15 +43,6 @@ client.RegisterHandler('message', message_handler)
client.send(xmpp.Presence(to=(conf('room') + '/' + conf('nick'))))
def send_msg(msg='''wee, I'm a native bot.'''):
client.send(
xmpp.protocol.Message(
to=conf('room'),
body=msg,
typ='groupchat'
)
)
while (t + time.time()) < 30:
client.Process(1)