3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-02 23:54:08 +01:00

global: only send to connected networks

This commit is contained in:
James Lu 2017-03-13 13:23:22 -07:00
parent a3dff204d3
commit 0a57c084bb

View File

@ -13,8 +13,9 @@ def g(irc, source, args):
message = " ".join(args)
message = message + " (sent by %s@%s)" % (irc.getFriendlyName(irc.called_by), irc.getFullNetworkName())
for name, ircd in world.networkobjects.items():
for channel in ircd.pseudoclient.channels:
ircd.msg(channel, message)
if ircd.connected.is_set(): # Only attempt to send to connected networks
for channel in ircd.pseudoclient.channels:
ircd.msg(channel, message)
utils.add_cmd(g, "global", featured=True)