mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
relay: only announce disconnects if the last connection was successful
This commit is contained in:
parent
b30d696e3a
commit
cd65da75c6
@ -1509,7 +1509,7 @@ def handle_disconnect(irc, numeric, command, args):
|
||||
|
||||
# Announce the disconnects to every leaf channel where the disconnected network is the owner
|
||||
announcement = conf.conf.get('relay', {}).get('disconnect_announcement')
|
||||
if announcement:
|
||||
if announcement and args.get('was_successful'):
|
||||
with db_lock:
|
||||
for chanpair, entrydata in db.items():
|
||||
if chanpair[0] == irc.name:
|
||||
|
Loading…
Reference in New Issue
Block a user