fix badlogins naming #6516

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-11-10 17:50:45 +00:00
parent d44faed29e
commit badee98b71
1 changed files with 2 additions and 6 deletions

View File

@ -7157,13 +7157,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
for (var i in parent.badLoginTable) {
badLoginCount++;
if (typeof parent.badLoginTable[i] == 'number') {
cmdData.result += "Cooloff for " + Math.floor((parent.badLoginTable[i] - Date.now()) / 60000) + " minute(s)\r\n";
cmdData.result += (i + " - Cooloff for " + Math.floor((parent.badLoginTable[i] - Date.now()) / 60000) + " minute(s)\r\n");
} else {
if (parent.badLoginTable[i].length > 1) {
cmdData.result += (i + ' - ' + parent.badLoginTable[i].length + " records\r\n");
} else {
cmdData.result += (i + ' - ' + parent.badLoginTable[i].length + " record\r\n");
}
cmdData.result += (i + ' - ' + parent.badLoginTable[i].length + " attempt(s) until Cooloff ban\r\n");
}
}
if (badLoginCount == 0) { cmdData.result += 'No bad logins.'; }