3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

relay: fix over-reaching behavior of delink #chan <remotenet> when you're the host

This commit is contained in:
James Lu 2015-07-15 11:47:06 -07:00
parent 0918b2f958
commit 4c77ad93d7

View File

@ -601,11 +601,10 @@ def delink(irc, source, args):
utils.msg(irc, source, "Error: you must select a network to delink, or use the 'destroy' command no remove this relay entirely.")
return
else:
for entry in db.values():
for link in entry['links'].copy():
if link[0] == remotenet:
removeChannel(utils.networkobjects[remotenet], link[1])
entry['links'].remove(link)
for link in db[entry]['links'].copy():
if link[0] == remotenet:
removeChannel(utils.networkobjects[remotenet], link[1])
db[entry]['links'].remove(link)
else:
removeChannel(irc, channel)
db[entry]['links'].remove((irc.name, channel))