Merge pull request #2188 from thelounge/xpaw/no-blind-playback-cap

Only request znc.in/playback if sqlite logging is enabled
This commit is contained in:
Jérémie Astori 2018-03-10 13:31:08 -05:00 committed by GitHub
commit f2fb27f6a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,