3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

global: ignore networks that don't have .pseudoclient set

This is the case for e.g. the control network object in pylink-discord.
This commit is contained in:
James Lu 2020-03-16 19:05:23 -07:00
parent f17540a7e2
commit b4d7883a71

View File

@ -28,7 +28,8 @@ def g(irc, source, args):
netcount = 0 netcount = 0
chancount = 0 chancount = 0
for netname, ircd in world.networkobjects.items(): for netname, ircd in world.networkobjects.items():
if ircd.connected.is_set(): # Only attempt to send to connected networks # Skip networks that aren't ready and dummy networks which don't have .pseudoclient set
if ircd.connected.is_set() and ircd.pseudoclient:
netcount += 1 netcount += 1
for channel in ircd.pseudoclient.channels: for channel in ircd.pseudoclient.channels: