コード例 #1
0
def run_bot():
    from jeeves.conf import settings
    from jeeves.core.bot import BotFactory
    factory = BotFactory(channel=settings.CHANNEL,
                         nickname=settings.NICKNAME,
                         password=settings.PASSWORD)
    if settings.SSL == True:
        if ssl:
            reactor.connectSSL(settings.HOST, settings.PORT, factory,
                               ssl.ClientContextFactory())
        else:
            print "Unable to establish an SSL connection."
    else:
        reactor.connectTCP(settings.HOST, settings.PORT, factory)
    reactor.run()
コード例 #2
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def setUp(self):
     super(PluginsTestSuite, self).setUp()
     factory = BotFactory(CHANNEL, USERNAME, None)
     self.bot = factory.buildProtocol(None)
コード例 #3
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def setUp(self):
     super(JeevesTestSuite, self).setUp()
     factory = BotFactory(settings)
     self.bot = factory.buildProtocol(None)
コード例 #4
0
 def setUp(self):
     super(PluginsTestSuite, self).setUp()
     factory = BotFactory(CHANNEL, USERNAME, None)
     self.bot = factory.buildProtocol(None)
コード例 #5
0
 def setUp(self):
     super(JeevesTestSuite, self).setUp()
     factory = BotFactory(settings)
     self.bot = factory.buildProtocol(None)