This commit is contained in:
shoopea 2019-07-08 18:33:24 +08:00
parent 2f2441cd9e
commit 12f793b59e

4
msg.go
View File

@ -2,7 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"log" //"log"
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
@ -174,7 +174,7 @@ func parseSubTypeMessageGoQuestAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW
cwm.Quest = strings.ToLower(r.ReplaceAllString(m.Text, "${Place}")) cwm.Quest = strings.ToLower(r.ReplaceAllString(m.Text, "${Place}"))
i, err := strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64) i, err := strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64)
if err != nil { if err != nil {
cwm.Duration = i * time.Minute cwm.Duration = time.Duration(i) * time.Minute
} else { } else {
cwm.Duration = 0 * time.Minute cwm.Duration = 0 * time.Minute
} }