From df595c65a186badc98433d9435e380328ef2c528 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 17 Jul 2015 16:01:51 -0700 Subject: [PATCH] fix SQUIT not respecting autoconnect delay --- main.py | 14 +++++++------- plugins/relay.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 924fa36..9c6eca8 100755 --- a/main.py +++ b/main.py @@ -80,13 +80,13 @@ class Irc(): log.warning('(%s) Disconnected from IRC: %s: %s', self.name, type(e).__name__, str(e)) self.disconnect() - autoconnect = self.serverdata.get('autoconnect') - log.debug('(%s) Autoconnect delay set to %s seconds.', self.name, autoconnect) - if autoconnect is not None and autoconnect >= 0: - log.info('(%s) Going to auto-reconnect in %s seconds.', self.name, autoconnect) - time.sleep(autoconnect) - else: - return + autoconnect = self.serverdata.get('autoconnect') + log.debug('(%s) Autoconnect delay set to %s seconds.', self.name, autoconnect) + if autoconnect is not None and autoconnect >= 0: + log.info('(%s) Going to auto-reconnect in %s seconds.', self.name, autoconnect) + time.sleep(autoconnect) + else: + return def disconnect(self): diff --git a/plugins/relay.py b/plugins/relay.py index a48895c..98e1b9f 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -19,7 +19,7 @@ def normalizeNick(irc, netname, nick, separator="/"): # Block until we know the IRC network's nick length (after capabilities # are sent) log.debug('(%s) normalizeNick: waiting for irc.connected', irc.name) - irc.connected.wait() + irc.connected.wait(3) orig_nick = nick protoname = irc.proto.__name__