First set of updates for formatting

This commit is contained in:
Nathan Byrd 2023-10-16 00:05:43 +00:00
parent e6cc890338
commit e2a9d35bb1
11 changed files with 521 additions and 457 deletions

View File

@ -20,6 +20,8 @@ const iconv = require('iconv-lite');
const { mkdirs } = require('fs-extra');
const { stripMciColorCodes } = require('./color_codes.js');
const parseFullName = require('parse-full-name').parseFullName;
//
// Resources
// * https://github.com/NuSkooler/ansi-bbs/tree/master/docs/dropfile_formats
@ -127,6 +129,43 @@ module.exports = class DropFile {
});
}
_getFirstName(fullname) {
return parseFullName(fullname).first;
}
_getLastName(fullname) {
return parseFullName(fullname).last;
}
getSysopFirstName() {
return this._getFirstName(StatLog.getSystemStat(SysProps.SysOpRealName));
}
getSysopLastName() {
return this._getLastName(StatLog.getSystemStat(SysProps.SysOpRealName));
}
_userStatAsString(statName, defaultValue) {
return (StatLog.getUserStat(this.client.user, statName) || defaultValue).toLocaleString();
}
_getUserRealName() {
return this._userStatAsString(UserProps.RealName, 'Unknown Unknown');
}
getUserFirstName() {
return this._getFirstName(this._getUserRealName);
}
getUserLastName() {
return this._getLastName(this._getUserRealName);
}
getUserTotalDownloadK() {
return StatLog.getUserStatNum(this.client.user, UserProps.FileDlTotalBytes) / 1024;
}
getDoorInfoFileName() {
let x;
const node = this.client.node;

View File

@ -1,36 +1,36 @@
%UR
{UR}
4
%SL
%LL
{SL}
{LL}
999
COLOR
NOTPROVIDED
%UI
{UI}
0
%CT
%CT %DT
%MC
%DN
{CT}
{CT} {DT}
{MC}
{DN}
999
0
999999
555-555-5555
%DT %CT
{DT} {CT}
NOVICE
All
%DT
%UC
%SH
{DT}
{UC}
{SH}
0
%UP
%DN
{UP}
{DN}
8
REMOTE
1
%BD
{BD}
38400
FALSE
Normal Connection
%DT %CT
%ND
{DT} {CT}
{ND}
0

View File

@ -1,14 +1,14 @@
%UI
%UN
%UR
{UI}
{UN}
{UR}
?
%UA
{UA}
M
%AP
%DT
%SW
%SH
%LL
{AP}
{DT}
{SW}
{SH}
{LL}
0
0
1
@ -20,12 +20,12 @@ C:\DATA\logfile.txt
C:\DATA\BBS.LOG
19200
1
%BN
%SR
{BN}
{SR}
1
0
0
%UP
{UP}
0
%DN
{DN}
8N1

View File

@ -1,52 +1,52 @@
COM1:
38400
8
%ND
{ND}
19200
N
N
N
N
%UR
%LO
{UR}
{LO}
555 555-5555
555 555-5555
NOT PROVIDED
%LL
%UC
%DT
{LL}
{UC}
{DT}
9999
999
GR
%SH
{SH}
N
%MC
%MC
{MC}
{MC}
12/31/9999
%UI
{UI}
Y
%UP
%DN
{UP}
{DN}
0
9999999
%BD
{BD}
C:\DATA
C:\DATA
%SR
%UZ
%CT
{SR}
{UZ}
{CT}
Y
Y
Y
7
32767
%DT
%CT
%CT
{DT}
{CT}
{CT}
9999
%DD
{DD}
0
0
%UM
%DR
{UM}
{DR}
32767

View File

@ -1,8 +1,8 @@
%UN
{UN}
1
1
%SH
{SH}
19200
1
-1
%UR
{UR}

View File

@ -1,4 +1,4 @@
%BN
{BN}
UNKNOWN
UNKNOWN
COM1
@ -6,8 +6,8 @@ COM1
0
UNKNOWN
UNKNOWN
%LO
{LO}
1
%LL
{LL}
999
-1

View File

@ -1,18 +1,18 @@
%UI
%UN
{UI}
{UN}
NOTPROVIDED
%LL
{LL}
N
Y
999
555-555-1212
%LO
%BD
%ND
{LO}
{BD}
{ND}
1
19200
0
N
Y
%BN
%SR
{BN}
{SR}

View File

@ -1,20 +1,20 @@
%UR
%BN
%SN
{UR}
{BN}
{SN}
The Guru
C:\CONTROL
C:\DATA
99
%ND
{ND}
99999
Yes
%SH
{SH}
209087929
%LL
{LL}
1
%BD
{BD}
M
%UI
{UI}
555-555-5555
1
4
@ -62,5 +62,5 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ
0
%UR
{UR}
38400

View File

@ -1,11 +1,11 @@
1
1
19200
%BN
%UI
%UR
%UN
{BN}
{UI}
{UR}
{UN}
1
999
1
%ND
{ND}

View File

@ -53,6 +53,7 @@
"node-pty": "1.0.0",
"nodemailer": "6.7.7",
"otplib": "11.0.1",
"parse-full-name": "^1.2.6",
"qrcode-generator": "^1.4.4",
"rlogin": "^1.0.0",
"sane": "5.0.1",

778
yarn.lock

File diff suppressed because it is too large Load Diff