Append an optional station log and announce the software after login.

A log path that cannot be written leaves the station on the reflector, and the reflector learns which program joined.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Konrad Neitzel
2026-10-03 19:24:00 +02:00
co-authored by Cursor
parent 6233292931
commit ec5f660fdd
12 changed files with 848 additions and 43 deletions
+24
View File
@@ -0,0 +1,24 @@
package station
import "encoding/json"
// SoftwareName and SoftwareVersion are the identity sent to the reflector
// after login. Edit them here.
const (
SoftwareName = "funknetz"
SoftwareVersion = "1.0.0"
)
func softwareIdentityBody() ([]byte, error) {
raw, err := json.Marshal(struct {
SW string `json:"sw"`
SWVer string `json:"swVer"`
}{
SW: SoftwareName,
SWVer: SoftwareVersion,
})
if err != nil {
return nil, err
}
return appendString(nil, string(raw)), nil
}