mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
fix SQUIT not respecting autoconnect delay
This commit is contained in:
parent
95853924ad
commit
df595c65a1
14
main.py
14
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):
|
||||
|
@ -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__
|
||||
|
Loading…
Reference in New Issue
Block a user