From 51466868145b1d285636434f94851bf6bf2462f5 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 10 Mar 2018 13:25:56 +0200 Subject: [PATCH] Only request znc.in/playback if sqlite logging is enabled --- src/client.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/client.js b/src/client.js index 2e47b354..90a2e021 100644 --- a/src/client.js +++ b/src/client.js @@ -270,10 +270,15 @@ Client.prototype.connect = function(args) { }); network.irc.requestCap([ - "znc.in/self-message", // Legacy echo-message for ZNc - "znc.in/playback", // http://wiki.znc.in/Playback + "znc.in/self-message", // Legacy echo-message for ZNC ]); + // Request only new messages from ZNC if we have sqlite logging enabled + // See http://wiki.znc.in/Playback + if (client.config.log && Helper.config.messageStorage.includes("sqlite")) { + network.irc.requestCap("znc.in/playback"); + } + events.forEach((plugin) => { require(`./plugins/irc-events/${plugin}`).apply(client, [ network.irc,