mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
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.
This commit is contained in:
parent
31a0d36990
commit
b1248524a9
@ -2381,6 +2381,9 @@ def delink(irc, source, args):
|
|||||||
if link[0] == remotenet:
|
if link[0] == remotenet:
|
||||||
remove_channel(world.networkobjects.get(remotenet), link[1])
|
remove_channel(world.networkobjects.get(remotenet), link[1])
|
||||||
db[entry]['links'].remove(link)
|
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:
|
else:
|
||||||
remove_channel(irc, channel)
|
remove_channel(irc, channel)
|
||||||
db[entry]['links'].remove((irc.name, channel))
|
db[entry]['links'].remove((irc.name, channel))
|
||||||
|
Loading…
Reference in New Issue
Block a user