more fixes
This commit is contained in:
parent
082430df55
commit
e0350ecb98
@ -1434,7 +1434,6 @@ func (self *nntpConnection) scrapeServer(daemon *NNTPDaemon, conn *textproto.Con
|
|||||||
// feed it to the daemon if we get it
|
// feed it to the daemon if we get it
|
||||||
func (self *nntpConnection) requestArticle(daemon *NNTPDaemon, conn *textproto.Conn, msgid string) (err error) {
|
func (self *nntpConnection) requestArticle(daemon *NNTPDaemon, conn *textproto.Conn, msgid string) (err error) {
|
||||||
if daemon.store.HasArticle(msgid) {
|
if daemon.store.HasArticle(msgid) {
|
||||||
log.Println("already have", msgid, "so not requesting it")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// send command
|
// send command
|
||||||
|
@ -278,7 +278,9 @@ func decAddr(encaddr, key string) string {
|
|||||||
res_bytes[idx] = encaddr_bytes[idx] ^ b
|
res_bytes[idx] = encaddr_bytes[idx] ^ b
|
||||||
}
|
}
|
||||||
res := string(res_bytes)
|
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 {
|
if strings.Index(res, "/") == -1 {
|
||||||
// TODO: ipv6
|
// TODO: ipv6
|
||||||
res += "/32"
|
res += "/32"
|
||||||
|
Reference in New Issue
Block a user