Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #echobot.tac
- from twisted.application import internet, service
- from twisted.words.protocols.jabber import jid
- from wokkel.client import XMPPClient
- from twisted.web import server, xmlrpc
- from twisted.internet import ssl
- from echobot import EchoBotProtocol, MyRPC
- application = service.Application("echobot")
- svcCollection = service.IServiceCollection(application)
- xmppclient = XMPPClient(jid.internJID("iwic02@jabber.int/mybot"), "123")
- xmppclient.logTraffic = False
- echobot = EchoBotProtocol()
- echobot.setHandlerParent(xmppclient)
- #xmppclient.setServiceParent(application)
- xmppclient.setServiceParent(svcCollection)
- LISTEN_HOST='localhost'
- LISTEN_PORT=50008
- site = server.Site(MyRPC())
- i = internet.TCPServer(LISTEN_PORT, site, interface=LISTEN_HOST)
- i.setServiceParent(svcCollection)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement