Merge branch 'zncPlayback'
This commit is contained in:
commit
791205d4f0
@ -237,7 +237,7 @@ Chan.prototype.writeUserLog = function (client, msg) {
|
||||
};
|
||||
|
||||
Chan.prototype.loadMessages = function (client, network) {
|
||||
if (!this.isLoggable() || !client.messageProvider) {
|
||||
if (!this.isLoggable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -249,6 +249,16 @@ Chan.prototype.loadMessages = function (client, network) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!client.messageProvider) {
|
||||
if (network.irc.network.cap.isEnabled("znc.in/playback")) {
|
||||
// if we do have a message provider we might be able to only fetch partial history,
|
||||
// so delay the cap in this case.
|
||||
requestZncPlayback(this, network, 0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
client.messageProvider
|
||||
.getMessages(network, this)
|
||||
.then((messages) => {
|
||||
|
@ -196,13 +196,8 @@ Network.prototype.createIrcFramework = function (client) {
|
||||
|
||||
this.irc.requestCap([
|
||||
"znc.in/self-message", // Legacy echo-message for ZNC
|
||||
"znc.in/playback", // See 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.messageProvider) {
|
||||
this.irc.requestCap("znc.in/playback");
|
||||
}
|
||||
};
|
||||
|
||||
Network.prototype.setIrcFrameworkOptions = function (client) {
|
||||
|
Loading…
Reference in New Issue
Block a user