Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

bino-echobot.tac

By: a guest on Aug 31st, 2010  |  syntax: Python  |  size: 0.80 KB  |  hits: 96  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #echobot.tac
  2. from twisted.application import internet, service
  3. from twisted.words.protocols.jabber import jid
  4. from wokkel.client import XMPPClient
  5.  
  6. from twisted.web import server, xmlrpc
  7. from twisted.internet import ssl
  8.  
  9.  
  10. from echobot import EchoBotProtocol, MyRPC
  11.  
  12. application = service.Application("echobot")
  13. svcCollection = service.IServiceCollection(application)
  14.  
  15. xmppclient = XMPPClient(jid.internJID("iwic02@jabber.int/mybot"), "123")
  16. xmppclient.logTraffic = False
  17. echobot = EchoBotProtocol()
  18. echobot.setHandlerParent(xmppclient)
  19. #xmppclient.setServiceParent(application)
  20. xmppclient.setServiceParent(svcCollection)
  21.  
  22. LISTEN_HOST='localhost'
  23. LISTEN_PORT=50008
  24.  
  25. site = server.Site(MyRPC())
  26. i = internet.TCPServer(LISTEN_PORT, site, interface=LISTEN_HOST)
  27. i.setServiceParent(svcCollection)