mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-17 14:01:03 +01:00
relay: fix regression causing 'load relay' to freeze
This commit is contained in:
parent
69cd3cfbf8
commit
ab5624343b
@ -49,16 +49,22 @@ def main(irc=None):
|
|||||||
# Load the relay links database.
|
# Load the relay links database.
|
||||||
loadDB()
|
loadDB()
|
||||||
|
|
||||||
|
log.debug('relay.main: loading links database')
|
||||||
|
|
||||||
# Schedule periodic exports of the links database.
|
# Schedule periodic exports of the links database.
|
||||||
scheduleExport(starting=True)
|
scheduleExport(starting=True)
|
||||||
|
|
||||||
|
log.debug('relay.main: scheduling export loop')
|
||||||
|
|
||||||
if irc is not None:
|
if irc is not None:
|
||||||
# irc is defined when the plugin is reloaded. Otherweise,
|
# irc is defined when the plugin is reloaded. Otherwise, it means that we've just started the
|
||||||
# it means that we've just started the server.
|
# server. Iterate over all connected networks and initialize their relay users.
|
||||||
# Iterate over all known networks and initialize them.
|
|
||||||
for ircobj in world.networkobjects.values():
|
for ircobj in world.networkobjects.values():
|
||||||
|
if ircobj.connected.is_set():
|
||||||
initializeAll(ircobj)
|
initializeAll(ircobj)
|
||||||
|
|
||||||
|
log.debug('relay.main: finished initialization sequence')
|
||||||
|
|
||||||
def die(sourceirc):
|
def die(sourceirc):
|
||||||
"""Deinitialize PyLink Relay by quitting all relay clients and saving the
|
"""Deinitialize PyLink Relay by quitting all relay clients and saving the
|
||||||
relay DB."""
|
relay DB."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user