From b1248524a9d184aa49ad75b294e1b8c9ab009c19 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 8 Jun 2018 18:45:45 -0700 Subject: [PATCH] relay: raise an error when trying to delink a leaf channel from another leaf network Previously this would (confusingly) delink the channel from the network the command was called on instead of the intended target. --- plugins/relay.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/relay.py b/plugins/relay.py index a8f47fb..55a75a7 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -2381,6 +2381,9 @@ def delink(irc, source, args): if link[0] == remotenet: remove_channel(world.networkobjects.get(remotenet), link[1]) db[entry]['links'].remove(link) + elif remotenet: + irc.error('You can only use this delink syntax from the network that owns this channel.') + return else: remove_channel(irc, channel) db[entry]['links'].remove((irc.name, channel))