From 28cd8a897c42705293776395fb669eee66549d6a Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 2 Jun 2015 13:03:38 +0100 Subject: [PATCH] do not spam channel logs with repeated disconnects when auto-connecting to a ZNC bouncer without entering the password it usually makes a disconnect every 2 minutes. this spams the log of every channel with disconnect messages. to not repeat a disconnect message more than once, we check for sess->total to see if the chan was opened on the previous connection. if not, the disconnect message is suppressed. --- src/common/text.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/text.c b/src/common/text.c index 2e3eb02..31d3352 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2026,6 +2026,9 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d, char* f if (sess->alert_tray == SET_ON) fe_tray_set_icon (FE_ICON_MESSAGE); break; + case XP_TE_DISCON: + /* do not spam log */ + if(!sess->total) return; } sound_play_event (index); -- 2.11.4.GIT