]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/tracker.go
Fix panic on empty news path
[rbdr/mobius] / hotline / tracker.go
index 2d655d97b5762c26ddd16a078b5f1033447d2a5a..a3e077eceb68d7a898a15f7b88599e4337e021a2 100644 (file)
@@ -18,6 +18,7 @@ type TrackerRegistration struct {
        PassID      [4]byte // Random number generated by the server
        Name        string  // Server Name
        Description string  // Description of the server
+       Password    string  // Tracker password, if required by tracker
 
        readOffset int // Internal offset to track read progress
 }
@@ -37,6 +38,8 @@ func (tr *TrackerRegistration) Read(p []byte) (int, error) {
                []byte(tr.Name),
                []byte{uint8(len(tr.Description))},
                []byte(tr.Description),
+               []byte{uint8(len(tr.Password))},
+               []byte(tr.Password),
        )
 
        if tr.readOffset >= len(buf) {