mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
This should be a fix for the inability to Ctrl-C quit.
This commit is contained in:
parent
614ed32908
commit
ee4900cb81
@ -69,15 +69,18 @@ class SupyIrcProtocol(LineReceiver):
|
|||||||
msg = self.irc.takeMsg()
|
msg = self.irc.takeMsg()
|
||||||
if msg:
|
if msg:
|
||||||
self.transport.write(str(msg))
|
self.transport.write(str(msg))
|
||||||
self.mostRecentCall = reactor.callLater(1, self.checkIrcForMsgs)
|
if not self.irc.zombie:
|
||||||
|
self.mostRecentCall = reactor.callLater(1, self.checkIrcForMsgs)
|
||||||
|
|
||||||
def connectionLost(self, failure):
|
def connectionLost(self, failure):
|
||||||
self.mostRecentCall.cancel()
|
|
||||||
drivers.log.disconnect(self.factory.currentServer, errorMsg(failure))
|
drivers.log.disconnect(self.factory.currentServer, errorMsg(failure))
|
||||||
if not self.irc.zombie:
|
if not self.irc.zombie:
|
||||||
self.irc.reset()
|
self.irc.reset()
|
||||||
else:
|
else:
|
||||||
self.factory.continueTrying = False
|
# Let's take and take and take until our IRC is DESTROYED!
|
||||||
|
x = 1
|
||||||
|
while x:
|
||||||
|
x = self.irc.takeMsg()
|
||||||
|
|
||||||
def connectionMade(self):
|
def connectionMade(self):
|
||||||
self.irc.reset()
|
self.irc.reset()
|
||||||
@ -113,8 +116,6 @@ class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
|
|||||||
|
|
||||||
def clientConnectionLost(self, connector, r):
|
def clientConnectionLost(self, connector, r):
|
||||||
(connector.host, connector.port) = self._getNextServer()
|
(connector.host, connector.port) = self._getNextServer()
|
||||||
if self.irc.zombie:
|
|
||||||
self.continueTrying = False
|
|
||||||
ReconnectingClientFactory.clientConnectionLost(self, connector, r)
|
ReconnectingClientFactory.clientConnectionLost(self, connector, r)
|
||||||
|
|
||||||
def startedConnecting(self, connector):
|
def startedConnecting(self, connector):
|
||||||
|
Loading…
Reference in New Issue
Block a user