1 from zope.interface import Interface
3 from twisted.internet.protocol import Factory, Protocol
7 class IQuoter(Interface):
9 An object that returns quotes.
19 def connectionMade(self):
20 self.transport.write(self.factory.quoter.getQuote()+'\r\n')
21 self.transport.loseConnection()
25 class QOTDFactory(Factory):
27 A factory for the Quote of the Day protocol.
29 @type quoter: L{IQuoter} provider
30 @ivar quoter: An object which provides L{IQuoter} which will be used by
31 the L{QOTD} protocol to get quotes to emit.
35 def __init__(self, quoter):