mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.0 KiB
28 lines
1.0 KiB
'use strict';
|
|
|
|
const timeUtils = require(__dirname+'/../lib/converter/timeutils.js');
|
|
|
|
module.exports = async(db, redis) => {
|
|
console.log('add more captcha options and add inactive account and board auto handling');
|
|
await db.collection('globalsettings').updateOne({ _id: 'globalsettings' }, {
|
|
'$set': {
|
|
'captchaOptions.text': {
|
|
'font': 'default',
|
|
'line': true,
|
|
'wave': 0,
|
|
'paint': 2,
|
|
'noise': 0,
|
|
},
|
|
'captchaOptions.grid.falses': ['○','□','♘','♢','▽','△','♖','✧','♔','♘','♕','♗','♙','♧'],
|
|
'captchaOptions.grid.trues': ['●','■','♞','♦','▼','▲','♜','✦','♚','♞','♛','♝','♟','♣'],
|
|
'captchaOptions.grid.question': 'Select the solid/filled icons',
|
|
'captchaOptions.grid.noise': 0,
|
|
'captchaOptions.grid.edge': 25,
|
|
'inactiveAccountTime': timeUtils.MONTH * 3,
|
|
'inactiveAccountAction': 0, //no actions by default
|
|
'abandonedBoardAction': 0,
|
|
},
|
|
});
|
|
console.log('Clearing globalsettings cache');
|
|
await redis.deletePattern('globalsettings');
|
|
};
|
|
|