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

relay: skip messages from clientbot networks when relay_clientbot isn't loaded

This commit is contained in:
James Lu 2020-08-15 23:23:29 -07:00
parent 16a7cef1aa
commit 2aa00d6efc

View File

@ -1515,6 +1515,9 @@ def handle_messages(irc, numeric, command, args):
log.debug('(%s) relay.handle_messages: dropping PM from server %s to %s',
irc.name, numeric, target)
return
elif not irc.has_cap('can-spawn-clients') and not world.plugins.get('relay_clientbot'):
# For consistency, only read messages from clientbot networks if relay_clientbot is loaded
return
relay = get_relay(irc, target)
remoteusers = relayusers[(irc.name, numeric)]