Only request znc.in/playback if sqlite logging is enabled

This commit is contained in:
Pavel Djundik 2018-03-10 13:25:56 +02:00
parent 1bf8c1578d
commit 5146686814

View File

@ -270,10 +270,15 @@ Client.prototype.connect = function(args) {
}); });
network.irc.requestCap([ network.irc.requestCap([
"znc.in/self-message", // Legacy echo-message for ZNc "znc.in/self-message", // Legacy echo-message for ZNC
"znc.in/playback", // http://wiki.znc.in/Playback
]); ]);
// 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) => { events.forEach((plugin) => {
require(`./plugins/irc-events/${plugin}`).apply(client, [ require(`./plugins/irc-events/${plugin}`).apply(client, [
network.irc, network.irc,