Merge pull request #1193 from GLolol/fix-disconnects

irclib: handle disconnections correctly for InspIRCd 2.0 networks
This commit is contained in:
Valentin Lorentz 2015-11-19 08:01:27 +01:00
commit 7884ed5133
1 changed files with 1 additions and 1 deletions

View File

@ -1278,7 +1278,7 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
"""Handles ERROR messages."""
log.warning('Error message from %s: %s', self.network, msg.args[0])
if not self.zombie:
if msg.args[0].startswith('Closing Link'):
if msg.args[0].lower().startswith('closing link'):
self.driver.reconnect()
elif 'too fast' in msg.args[0]: # Connecting too fast.
self.driver.reconnect(wait=True)