test
This commit is contained in:
parent
b8b875748f
commit
2f2441cd9e
7
msg.go
7
msg.go
@ -172,7 +172,12 @@ func parseSubTypeMessageGoQuestAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW
|
|||||||
log.Printf("parseSubTypeMessageGoQuestAck : Time : %s\n", r.ReplaceAllString(m.Text, "${Time}"))
|
log.Printf("parseSubTypeMessageGoQuestAck : Time : %s\n", r.ReplaceAllString(m.Text, "${Time}"))
|
||||||
*/
|
*/
|
||||||
cwm.Quest = strings.ToLower(r.ReplaceAllString(m.Text, "${Place}"))
|
cwm.Quest = strings.ToLower(r.ReplaceAllString(m.Text, "${Place}"))
|
||||||
cwm.Duration, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64)
|
i, err := strconv.ParseInt(r.ReplaceAllString(m.Text, "${Time}"), 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
cwm.Duration = i * time.Minute
|
||||||
|
} else {
|
||||||
|
cwm.Duration = 0 * time.Minute
|
||||||
|
}
|
||||||
return &cwm, nil
|
return &cwm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user