Added timeout message
This commit is contained in:
parent
f447df90fb
commit
dc6741a305
3 changed files with 64 additions and 62 deletions
|
@ -216,7 +216,7 @@ module.exports = {
|
|||
"legal": {
|
||||
"time": 20,
|
||||
"countries": [],
|
||||
"message": "The trailer will appear after [timer] seconds. To display the movie player on this location, turn off the <a href=\"/admin/blocking\" target=\"_blank\" style=\"color:white;\">in the admin panel, the «Blocking» module</a>.\n\n<br><br>\n\n<div class=search-ggl onclick=\"window.open('https://href.li/?https://google.com/search?&tbm=vid&q=[title] [year] watch online','_blank')\">Watch online on <span class=g>G</span><span class=o>o</span><span class=o>o</span><span class=g>g</span><span class=l>l</span><span class=e>e</span></div>\n\n<div class=search-ynd onclick=\"window.open('https://href.li/?https://yandex.fr/video/search?text=[title] [year] watch online','_blank')\">Watch online on <span class=y>Y</span>andex</div>\n\n<br><br><br>\n\n<div class=search-ggl onclick=\"window.open('https://href.li/?https://play.google.com/store/search?c=movies&q=[title]','_blank')\">Buy on <span class=g>G</span><span class=o>o</span><span class=o>o</span><span class=g>g</span><span class=l>l</span><span class=e>e</span> Play</div>\n\n<div class=search-amz onclick=\"window.open('https://href.li/?https://www.amazon.com/s?i=instant-video&k=[title]','_blank')\">Buy on amazon <span class=p>prime</span></div>"
|
||||
"message": "The trailer will appear after [timer] seconds. To display the movie player on this location, turn off the <a href=\"/admin-secret/blocking\" target=\"_blank\" style=\"color:white;\">in the admin panel, the «Blocking» module</a>.\n\n<br><br>\n\n<div class=search-ggl onclick=\"window.open('https://href.li/?https://google.com/search?&tbm=vid&q=[title] [year] watch online','_blank')\">Watch online on <span class=g>G</span><span class=o>o</span><span class=o>o</span><span class=g>g</span><span class=l>l</span><span class=e>e</span></div>\n\n<div class=search-ynd onclick=\"window.open('https://href.li/?https://yandex.fr/video/search?text=[title] [year] watch online','_blank')\">Watch online on <span class=y>Y</span>andex</div>\n\n<br><br><br>\n\n<div class=search-ggl onclick=\"window.open('https://href.li/?https://play.google.com/store/search?c=movies&q=[title]','_blank')\">Buy on <span class=g>G</span><span class=o>o</span><span class=o>o</span><span class=g>g</span><span class=l>l</span><span class=e>e</span> Play</div>\n\n<div class=search-amz onclick=\"window.open('https://href.li/?https://www.amazon.com/s?i=instant-video&k=[title]','_blank')\">Buy on amazon <span class=p>prime</span></div>"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -216,7 +216,7 @@ module.exports = {
|
|||
"legal": {
|
||||
"time": 20,
|
||||
"countries": [],
|
||||
"message": "Трейлер появится, через [timer] секунд. Чтобы отображать на этом месте плеер фильма, отключите <a href=\"/admin/blocking\" target=\"_blank\" style=\"color:white;\">в админ-панели модуль «Блокировка»</a>.\n\n<br><br>\n\n<div class=search-ggl onclick=\"window.open('https://href.li/?https://google.com/search?&tbm=vid&q=[title] [year] смотреть онлайн','_blank')\">Смотреть онлайн в <span class=g>G</span><span class=o>o</span><span class=o>o</span><span class=g>g</span><span class=l>l</span><span class=e>e</span></div>\n\n<div class=search-ynd onclick=\"window.open('https://href.li/?https://yandex.fr/video/search?text=[title] [year] смотреть онлайн','_blank')\">Смотреть онлайн в <span class=y>Я</span>ндекс</div>\n\n<br><br><br>\n\n<div class=search-ivi onclick=\"window.open('https://href.li/?https://www.ivi.ru/search/?q=[title]','_blank')\">Купить в <span class=i>ivi</span></div>\n\n<div class=search-knp onclick=\"window.open('https://href.li/?https://www.kinopoisk.ru/film/[kp_id]/watch/?from_block=button_online','_blank')\">Купить в КиноПоиск <span class=h>HD</span></div>"
|
||||
"message": "Трейлер появится, через [timer] секунд. Чтобы отображать на этом месте плеер фильма, отключите <a href=\"/admin-secret/blocking\" target=\"_blank\" style=\"color:white;\">в админ-панели модуль «Блокировка»</a>.\n\n<br><br>\n\n<div class=search-ggl onclick=\"window.open('https://href.li/?https://google.com/search?&tbm=vid&q=[title] [year] смотреть онлайн','_blank')\">Смотреть онлайн в <span class=g>G</span><span class=o>o</span><span class=o>o</span><span class=g>g</span><span class=l>l</span><span class=e>e</span></div>\n\n<div class=search-ynd onclick=\"window.open('https://href.li/?https://yandex.fr/video/search?text=[title] [year] смотреть онлайн','_blank')\">Смотреть онлайн в <span class=y>Я</span>ндекс</div>\n\n<br><br><br>\n\n<div class=search-ivi onclick=\"window.open('https://href.li/?https://www.ivi.ru/search/?q=[title]','_blank')\">Купить в <span class=i>ivi</span></div>\n\n<div class=search-knp onclick=\"window.open('https://href.li/?https://www.kinopoisk.ru/film/[kp_id]/watch/?from_block=button_online','_blank')\">Купить в КиноПоиск <span class=h>HD</span></div>"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
122
lib/CP_cron.js
122
lib/CP_cron.js
|
@ -1428,74 +1428,76 @@ if (
|
|||
html:
|
||||
message +
|
||||
'<br><br><blockquote>' +
|
||||
headers_[i].text +
|
||||
headers_[i].text.replace(/\n/g, '<br>') +
|
||||
'</blockquote>'
|
||||
};
|
||||
transporter.sendMail(mailOptions, function(err) {
|
||||
if (err) console.error('sendMail', err);
|
||||
console.log(
|
||||
'REPLY',
|
||||
headers_[i].to,
|
||||
'RE: ' + headers_[i].subject
|
||||
);
|
||||
if (!err && modules.abuse.data.smtp.host.indexOf('yandex') + 1) {
|
||||
var imap2 = new Imap(options_imap);
|
||||
imap2.once('ready', function() {
|
||||
imap2.openBox('Sent', false, function(err, box) {
|
||||
if (err) {
|
||||
console.error('openBox Sent', err);
|
||||
imap2.end();
|
||||
callback();
|
||||
}
|
||||
let msg, htmlEntity;
|
||||
msg = mimemessage.factory({
|
||||
contentType: 'multipart/alternate',
|
||||
body: []
|
||||
});
|
||||
htmlEntity = mimemessage.factory({
|
||||
contentType: 'text/html;charset=utf-8',
|
||||
body: mailOptions.html
|
||||
});
|
||||
msg.header(
|
||||
'Message-ID',
|
||||
'<' +
|
||||
setTimeout(function() {
|
||||
transporter.sendMail(mailOptions, function(err) {
|
||||
if (err) console.error('sendMail', err);
|
||||
console.log(
|
||||
'REPLY',
|
||||
headers_[i].to,
|
||||
'RE: ' + headers_[i].subject
|
||||
);
|
||||
if (!err && modules.abuse.data.smtp.host.indexOf('yandex') + 1) {
|
||||
var imap2 = new Imap(options_imap);
|
||||
imap2.once('ready', function() {
|
||||
imap2.openBox('Sent', false, function(err, box) {
|
||||
if (err) {
|
||||
console.error('openBox Sent', err);
|
||||
imap2.end();
|
||||
callback();
|
||||
}
|
||||
let msg, htmlEntity;
|
||||
msg = mimemessage.factory({
|
||||
contentType: 'multipart/alternate',
|
||||
body: []
|
||||
});
|
||||
htmlEntity = mimemessage.factory({
|
||||
contentType: 'text/html;charset=utf-8',
|
||||
body: mailOptions.html
|
||||
});
|
||||
msg.header(
|
||||
'Message-ID',
|
||||
'<' +
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substr(2, 5) +
|
||||
'>'
|
||||
);
|
||||
msg.header('From', mailOptions.from);
|
||||
msg.header('To', mailOptions.to);
|
||||
msg.header('Subject', mailOptions.subject);
|
||||
msg.header('Date', new Date());
|
||||
msg.body.push(htmlEntity);
|
||||
imap2.append(
|
||||
msg.toString(),
|
||||
{
|
||||
mailbox: 'Sent',
|
||||
flags: ['Seen'],
|
||||
date: new Date(Date.now())
|
||||
},
|
||||
function(err) {
|
||||
if (err) {
|
||||
console.error('APPEND', err);
|
||||
);
|
||||
msg.header('From', mailOptions.from);
|
||||
msg.header('To', mailOptions.to);
|
||||
msg.header('Subject', mailOptions.subject);
|
||||
msg.header('Date', new Date());
|
||||
msg.body.push(htmlEntity);
|
||||
imap2.append(
|
||||
msg.toString(),
|
||||
{
|
||||
mailbox: 'Sent',
|
||||
flags: ['Seen'],
|
||||
date: new Date(Date.now())
|
||||
},
|
||||
function(err) {
|
||||
if (err) {
|
||||
console.error('APPEND', err);
|
||||
}
|
||||
imap2.end();
|
||||
}
|
||||
imap2.end();
|
||||
}
|
||||
);
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
imap2.once('error', function(err) {
|
||||
console.error('SENT FOLDER', err);
|
||||
callback();
|
||||
});
|
||||
imap2.once('end', function() {
|
||||
console.error('SENT', mailOptions.to, mailOptions.subject);
|
||||
callback();
|
||||
});
|
||||
imap2.connect();
|
||||
}
|
||||
});
|
||||
imap2.once('error', function(err) {
|
||||
console.error('SENT FOLDER', err);
|
||||
callback();
|
||||
});
|
||||
imap2.once('end', function() {
|
||||
console.error('SENT', mailOptions.to, mailOptions.subject);
|
||||
callback();
|
||||
});
|
||||
imap2.connect();
|
||||
}
|
||||
});
|
||||
}, 10000*i);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue