Improve login, replace deprecated substr calls

This commit is contained in:
Casper Warden
2023-11-29 16:01:50 +00:00
parent 09db20682e
commit 58c5a1a08e
14 changed files with 114 additions and 78 deletions

View File

@@ -59,7 +59,7 @@ function getBlocks(str)
count--;
if (count === 0)
{
let s = str.substr(startPos+1, (i - startPos)-1);
let s = str.substring(startPos + 1, i);
block.push(s);
started = false;
}
@@ -86,7 +86,7 @@ fs.readFile('./message_template.msg', (err, data) =>
let pos = line.indexOf('//');
if (pos !== -1)
{
line = line.substr(0, pos-1);
line = line.substring(0, pos-1);
}
newLines.push(line);
}