Fix APRS counters, BBS reads and chat parsing; add reliable packet TX helpers

This commit is contained in:
alberto committed 2026-10-29 16:37:51 +01:00
1 parent 0668a73d40
commit 3643638090
15 files changed
+119 -56

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ export class Chat {
if(this.section==='topics'){if(/^[A-Za-z0-9_-]+$/.test(line)&&line!==this.call){this.topics.push(line);}return;}
if(this.section==='links'){const m=line.match(/^([A-Z0-9]+(?:-\d+)?)\s+(Open|Connect failed|Connecting|Closed|Idle)(.*)$/i);if(m){this.links.push({call:m[1],state:m[2],detail:m[3].trim()});return;}this.section='';}
if(/^Nodes via /.test(line)){this.section='nodes';return;}
if(this.section==='nodes'&&/^[A-Z0-9#][A-Z0-9#_-]{0,31}(?:\s+[A-Z0-9#][A-Z0-9#_-]{0,31})*$/.test(line))return;
if(this.section==='nodes'&&/^[A-Z0-9#$][A-Z0-9#$_-]{0,31}(?:\s+[A-Z0-9#$][A-Z0-9#$_-]{0,31})*$/.test(line))return;
if(/^[A-Z0-9-]+ Chat Server|^Type \/h|^Bringing up links|^This may take|^The \/p|^[A-Z0-9]{1,6}:/.test(line))return;
const message=line.match(/^(?:\d{2}:\d{2}(?::\d{2})?\s+)?(?:<|\[)?([A-Z0-9]*\d[A-Z0-9]*(?:-\d+)?)(?:>|\])?\s*(?:\([^)]*\))?[: ]+(.+)$/);
this.event(message?'message':'system',message?message[2]:line,message?message[1]:null);}