Skip to content

Commit 2e002e6

Browse files
committed
Change base64 decoding from broken to hacky
Apparently chardata doesn't do what I hoped it would
1 parent 946bd52 commit 2e002e6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ircmap.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ func scrubValues(ircmap []irctree.Server) {
147147
node.Position = irctree.PositionLeaf
148148
node.Label = strings.TrimPrefix(node.Label, leafPrefix)
149149
}
150-
if node.Descb64 != "" {
151-
rawstr, err := base64.RawStdEncoding.DecodeString(node.Descb64)
152-
if err == nil {
153-
node.Description = string(rawstr)
154-
}
150+
rawstr, err := base64.RawStdEncoding.DecodeString(node.Description)
151+
if err == nil {
152+
node.Description = string(rawstr)
155153
}
156154
}
157155
}

irctree/types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ type Server struct {
2222
Users int `xml:"usercount" json:"usercount"`
2323
Transit int `xml:"-" json:"-"`
2424
Description string `xml:"gecos" json:"desc"`
25-
Descb64 string `xml:",chardata" json:"-"`
2625
Position int `xml:"-" json:"group"`
2726
}
2827

0 commit comments

Comments
 (0)