2 # -*- coding: utf-8 -*-
6 from sid.sid import MUCBot
7 from sid.ping import Ping
8 from sid.feeds import Feeds
10 JID = 'bot@example.org'
12 PASS = getpass.getpass('Password for "{}": '.format(JID))
13 ROOM = 'room@conf.example.org'
17 xmpp = MUCBot(JID, PASS, ROOM, NICK)
18 xmpp.register_bot_plugin(Feeds)
19 xmpp.register_bot_plugin(Ping)
20 # Connect to the XMPP server and start processing XMPP stanzas.
22 # If you do not have the dnspython library installed, you will need
23 # to manually specify the name of the server if it does not match
24 # the one in the JID. For example, to use Google Talk you would
27 # if xmpp.connect(('talk.google.com', 5222)):
29 xmpp.process(block=True)
30 xmpp.shutdown_plugins()
33 xmpp.log.info('Unable to connect.')
36 if __name__ == '__main__':
40 # vim: ai ts=4 sw=4 sts=4 expandtab