Archived
1
0

more fixes

This commit is contained in:
Jeff Becker 2017-12-29 13:08:42 -05:00
parent 082430df55
commit e0350ecb98
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 3 additions and 2 deletions

View File

@ -1434,7 +1434,6 @@ func (self *nntpConnection) scrapeServer(daemon *NNTPDaemon, conn *textproto.Con
// feed it to the daemon if we get it
func (self *nntpConnection) requestArticle(daemon *NNTPDaemon, conn *textproto.Conn, msgid string) (err error) {
if daemon.store.HasArticle(msgid) {
log.Println("already have", msgid, "so not requesting it")
return
}
// send command

View File

@ -278,7 +278,9 @@ func decAddr(encaddr, key string) string {
res_bytes[idx] = encaddr_bytes[idx] ^ b
}
res := string(res_bytes)
res = strings.Trim(res, " ")
res = strings.TrimFunc(res, func(r rune) bool {
return r > 57 || r < 48 || r != '.' || r != '/'
})
if strings.Index(res, "/") == -1 {
// TODO: ipv6
res += "/32"