mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +01:00
Merge remote-tracking branch 'origin/master' into devel
This commit is contained in:
commit
f009a739bc
@ -45,8 +45,8 @@ class Irc():
|
|||||||
self.bot_clients = {}
|
self.bot_clients = {}
|
||||||
self.protoname = proto.__name__
|
self.protoname = proto.__name__
|
||||||
self.proto = proto.Class(self)
|
self.proto = proto.Class(self)
|
||||||
self.pingfreq = self.serverdata.get('pingfreq') or 180
|
self.pingfreq = self.serverdata.get('pingfreq') or 90
|
||||||
self.pingtimeout = self.pingfreq * 3
|
self.pingtimeout = self.pingfreq * 2
|
||||||
|
|
||||||
self.connected = threading.Event()
|
self.connected = threading.Event()
|
||||||
self.aborted = threading.Event()
|
self.aborted = threading.Event()
|
||||||
@ -96,7 +96,7 @@ class Irc():
|
|||||||
"""
|
"""
|
||||||
self.sid = self.serverdata["sid"]
|
self.sid = self.serverdata["sid"]
|
||||||
self.botdata = self.conf['bot']
|
self.botdata = self.conf['bot']
|
||||||
self.pingfreq = self.serverdata.get('pingfreq') or 180
|
self.pingfreq = self.serverdata.get('pingfreq') or 90
|
||||||
self.pingtimeout = self.pingfreq * 3
|
self.pingtimeout = self.pingfreq * 3
|
||||||
|
|
||||||
self.connected.clear()
|
self.connected.clear()
|
||||||
|
@ -334,11 +334,9 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
|
|||||||
Gets the UID of the relay client requested on the target network (remoteirc),
|
Gets the UID of the relay client requested on the target network (remoteirc),
|
||||||
spawning one if it doesn't exist and spawnIfMissing is True."""
|
spawning one if it doesn't exist and spawnIfMissing is True."""
|
||||||
|
|
||||||
# Wait until both the local and remote networks are working before trying to spawn anything.
|
# Wait until the network is working before trying to spawn anything.
|
||||||
log.debug('(%s) getRemoteUser: waiting for irc.connected', irc.name)
|
log.debug('(%s) getRemoteUser: waiting for irc.connected', irc.name)
|
||||||
irc.connected.wait()
|
irc.connected.wait()
|
||||||
log.debug('(%s) getRemoteUser: waiting for %s.connected', irc.name, remoteirc.name)
|
|
||||||
remoteirc.connected.wait()
|
|
||||||
|
|
||||||
# Don't spawn clones for registered service bots.
|
# Don't spawn clones for registered service bots.
|
||||||
sbot = irc.isServiceBot(user)
|
sbot = irc.isServiceBot(user)
|
||||||
|
Loading…
Reference in New Issue
Block a user