From cd65da75c650fd26832ff24f1a216bfba3e29842 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 24 Feb 2017 21:42:58 -0800 Subject: [PATCH] relay: only announce disconnects if the last connection was successful --- plugins/relay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index e4fe4ea..019e0ae 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -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: