~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/plugins/twisted_words.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-01-16 19:56:10 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060116195610-ykmxbia4mnnod9o2
Tags: 2.1.0-0ubuntu2
debian/copyright: Include copyright for python 2.3; some 2.3 files
are included in the upstream tarball, but not in the binary packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
from twisted.scripts.mktap import _tapHelper
10
10
from twisted.application import service, compat
11
11
from twisted.python.reflect import namedAny
12
 
from twisted.words import botbot
13
 
 
14
 
class _ancientTAPHelper(_tapHelper):
15
 
    def makeService(self, options):
16
 
        ser = service.MultiService()
17
 
        oldapp = compat.IOldApplication(ser)
18
 
        oldapp.name = "Twisted Words"
19
 
        namedAny(self.module).updateApplication(oldapp, options)
20
 
        return ser
21
 
 
22
 
TwistedWords = _ancientTAPHelper(
23
 
    "Twisted Words",
24
 
    "twisted.words.tap",
25
 
    "A chat service.",
26
 
    "words")
 
12
from twisted.words import iwords
 
13
 
27
14
 
28
15
TwistedTOC = _tapHelper(
29
16
    "Twisted TOC Server",
31
18
    "An AIM TOC service.",
32
19
    "toc")
33
20
 
34
 
class WordsBot:
35
 
    classProvides(IPlugin, botbot.IBotBot)
36
 
 
37
 
    name = "Bot-Creating Bot"
38
 
    botType = "botbot"
39
 
 
40
 
    def createBot():
41
 
        return botbot.createBot()
42
 
    createBot = staticmethod(createBot)
43
 
backwardsCompatImplements(WordsBot)
 
21
NewTwistedWords = _tapHelper(
 
22
    "New Twisted Words",
 
23
    "twisted.words.tap",
 
24
    "A modern words server",
 
25
    "words")
 
26
 
 
27
class RelayChatInterface(object):
 
28
    classProvides(IPlugin, iwords.IProtocolPlugin)
 
29
 
 
30
    name = 'irc'
 
31
 
 
32
    def getFactory(cls, realm, portal):
 
33
        from twisted.words import service
 
34
        return service.IRCFactory(realm, portal)
 
35
    getFactory = classmethod(getFactory)
 
36
 
 
37
class PBChatInterface(object):
 
38
    classProvides(IPlugin, iwords.IProtocolPlugin)
 
39
 
 
40
    name = 'pb'
 
41
 
 
42
    def getFactory(cls, realm, portal):
 
43
        from twisted.spread import pb
 
44
        return pb.PBServerFactory(portal, True)
 
45
    getFactory = classmethod(getFactory)
 
46