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 { mkdirs } = require('fs-extra');
const { stripMciColorCodes } = require('./color_codes.js'); const { stripMciColorCodes } = require('./color_codes.js');
const parseFullName = require('parse-full-name').parseFullName;
// //
// Resources // Resources
// * https://github.com/NuSkooler/ansi-bbs/tree/master/docs/dropfile_formats // * 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() { getDoorInfoFileName() {
let x; let x;
const node = this.client.node; const node = this.client.node;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

778
yarn.lock

File diff suppressed because it is too large Load Diff