python jabber MUC bot .tac

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from twisted.application import service
from twisted.words.protocols.jabber import jid
from wokkel.client import XMPPClient
from shortclient import MUCSomeBot
application = service.Application("somebot")
xmppclient = XMPPClient(jid.internJID("login@server.com/somebot"), "password")
xmppclient.logTraffic = True
mucbot = MUCSomeBot('conference.jabber.server','room', 'SomeBot')
mucbot.setHandlerParent(xmppclient)
xmppclient.setServiceParent(application)