Skip to content

Commit

Permalink
fix badlogins naming #6516
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <[email protected]>
  • Loading branch information
si458 committed Nov 10, 2024
1 parent d44faed commit badee98
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions meshuser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.'; }
Expand Down

0 comments on commit badee98

Please sign in to comment.