mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +01:00
relay: don't try to spawn clients on disconnected networks (those raise errors)
This commit is contained in:
parent
4c77ad93d7
commit
e3e643de54
@ -86,8 +86,9 @@ def getRemoteUser(irc, remoteirc, user):
|
|||||||
u = relayusers[(irc.name, user)][remoteirc.name]
|
u = relayusers[(irc.name, user)][remoteirc.name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
userobj = irc.users.get(user)
|
userobj = irc.users.get(user)
|
||||||
if userobj is None:
|
if userobj is None or not remoteirc.connected:
|
||||||
# The query wasn't actually a valid user... Oh well!
|
# The query wasn't actually a valid user, or the network hasn't
|
||||||
|
# been connected yet... Oh well!
|
||||||
return
|
return
|
||||||
nick = normalizeNick(remoteirc, irc.name, userobj.nick)
|
nick = normalizeNick(remoteirc, irc.name, userobj.nick)
|
||||||
ident = userobj.ident
|
ident = userobj.ident
|
||||||
@ -163,6 +164,8 @@ def initializeChannel(irc, channel):
|
|||||||
if remotenet == irc.name:
|
if remotenet == irc.name:
|
||||||
continue
|
continue
|
||||||
remoteirc = utils.networkobjects[remotenet]
|
remoteirc = utils.networkobjects[remotenet]
|
||||||
|
if not remoteirc.connected:
|
||||||
|
continue # They aren't connected, don't bother!
|
||||||
rc = remoteirc.channels[remotechan]
|
rc = remoteirc.channels[remotechan]
|
||||||
for user in remoteirc.channels[remotechan].users:
|
for user in remoteirc.channels[remotechan].users:
|
||||||
# Don't spawn our pseudoclients again.
|
# Don't spawn our pseudoclients again.
|
||||||
|
Loading…
Reference in New Issue
Block a user