mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-26 20:52:45 +01:00
irclib: handle disconnections correctly for InspIRCd 2.0 networks
The old code, which checked for "Closing Link" in the message, wouldn't have matched InspIRCd's way of closing connections (they send "Closing link" with a lowercase l): DEBUG 2015-09-27T19:15:32 Incoming message (overdrive-irc): ERROR :Closing link: (LilyBot@0::1) [Quit: test]
This commit is contained in:
parent
532309ecff
commit
1168b4d0b7
@ -1278,7 +1278,7 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
|
|||||||
"""Handles ERROR messages."""
|
"""Handles ERROR messages."""
|
||||||
log.warning('Error message from %s: %s', self.network, msg.args[0])
|
log.warning('Error message from %s: %s', self.network, msg.args[0])
|
||||||
if not self.zombie:
|
if not self.zombie:
|
||||||
if msg.args[0].startswith('Closing Link'):
|
if msg.args[0].lower().startswith('closing link'):
|
||||||
self.driver.reconnect()
|
self.driver.reconnect()
|
||||||
elif 'too fast' in msg.args[0]: # Connecting too fast.
|
elif 'too fast' in msg.args[0]: # Connecting too fast.
|
||||||
self.driver.reconnect(wait=True)
|
self.driver.reconnect(wait=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user