root / trunk / twisted / words / im / proxyui.py

Revision 11450, 0.5 kB (checked in by radix, 5 years ago)

MIT LICENSE: new LICENSE file and new preambles for all .py files. This is not all.

Line 
1 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 #
5
6 from twisted.words.protocols.irc import IRC
7 from twisted.python import log
8 from twisted.internet.protocol import Factory
9
10 class IRCUserInterface(IRC):
11     def connectionLost(self):
12         del self.factory.ircui
13
14 class IRCUIFactory(Factory):
15     ircui = None
16     def buildProtocol(self):
17         if self.ircui:
18             log.msg("already logged in")
19             return None
20         i = IRCUserInterface()
21         i.factory = self
22         self.ircui = i
23         return i
24
Note: See TracBrowser for help on using the browser.