mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
relay: don't error if the privmsg source on a remote network is missing
This can happen when someone speaks while a network is initializing, for example.
This commit is contained in:
parent
bb8a548e74
commit
f6a9f0729a
@ -918,12 +918,13 @@ def handle_messages(irc, numeric, command, args):
|
||||
real_target = getRemoteChan(irc, remoteirc, target)
|
||||
|
||||
# Don't relay anything back to the source net, or to disconnected networks
|
||||
# and networks without a relay for this channel
|
||||
# and networks without a relay for this channel.
|
||||
if irc.name == name or (not remoteirc.connected.is_set()) or (not real_target) \
|
||||
or (not irc.connected.is_set()):
|
||||
continue
|
||||
|
||||
user = getRemoteUser(irc, remoteirc, numeric, spawnIfMissing=False)
|
||||
if user: # If the user doesn't exist, drop the message.
|
||||
real_target = prefix + real_target
|
||||
log.debug('(%s) relay.handle_messages: sending message to %s from %s on behalf of %s',
|
||||
irc.name, real_target, user, numeric)
|
||||
|
Loading…
Reference in New Issue
Block a user