Allow negative scores

Backport from hassansin/spamc b25aae496c32bda27dac6af18f313ea6d23b0b8b
This commit is contained in:
Dolf Schimmel (Freeaqingme)
2015-11-24 18:29:32 +01:00
parent d85b0bc4e9
commit be6287645a

View File

@@ -338,7 +338,7 @@ func processResponse(cmd string, data *bufio.Reader) (returnObj *SpamDOut, err e
line, _, _ := data.ReadLine()
lineStr := string(line)
r := regexp.MustCompile(`(?i)SPAMD\/([0-9\.]+)\s([0-9]+)\s([0-9A-Z_]+)`)
r := regexp.MustCompile(`(?i)SPAMD\/([0-9\.\-]+)\s([0-9]+)\s([0-9A-Z_]+)`)
var result = r.FindStringSubmatch(lineStr)
if len(result) < 4 {
if cmd != "SKIP" {