fix
This commit is contained in:
parent
80752d2225
commit
94437db65e
8
cron.go
8
cron.go
@ -86,5 +86,13 @@ func cronGetHammerTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func cronSaveClients() {
|
func cronSaveClients() {
|
||||||
|
var clts []ChirpClient
|
||||||
|
|
||||||
|
muxClients.RLock()
|
||||||
|
for _, c := range clients {
|
||||||
|
if c.Active {
|
||||||
|
clts = append(clts, c)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
muxClients.RUnLock()
|
||||||
}
|
}
|
||||||
|
12
msg.go
12
msg.go
@ -354,11 +354,11 @@ func parseSubTypeMessageGRolesAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
|
|||||||
|
|
||||||
func parseSubTypeMessageGoQuestAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageGoQuestAck, error) {
|
func parseSubTypeMessageGoQuestAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageGoQuestAck, error) {
|
||||||
cwm := ChatWarsMessageGoQuestAck{}
|
cwm := ChatWarsMessageGoQuestAck{}
|
||||||
|
/*
|
||||||
log.Printf("parseSubTypeMessageGoQuestAck : Go Quest Ack report identified\n")
|
log.Printf("parseSubTypeMessageGoQuestAck : Go Quest Ack report identified\n")
|
||||||
log.Printf("parseSubTypeMessageGoQuestAck : Place : %s\n", r.ReplaceAllString(m.Text, "${Place}"))
|
log.Printf("parseSubTypeMessageGoQuestAck : Place : %s\n", r.ReplaceAllString(m.Text, "${Place}"))
|
||||||
log.Printf("parseSubTypeMessageGoQuestAck : Time : %s\n", r.ReplaceAllString(m.Text, "${Time}"))
|
log.Printf("parseSubTypeMessageGoQuestAck : Time : %s\n", r.ReplaceAllString(m.Text, "${Time}"))
|
||||||
|
*/
|
||||||
switch quest := strings.ToLower(r.ReplaceAllString(m.Text, "${Place}")); quest {
|
switch quest := strings.ToLower(r.ReplaceAllString(m.Text, "${Place}")); quest {
|
||||||
case "forest":
|
case "forest":
|
||||||
cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
|
cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
|
||||||
@ -369,7 +369,7 @@ func parseSubTypeMessageGoQuestAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW
|
|||||||
cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
|
cwm.QuestTypeID64 = cacheObjSubType[`quest_forest`]
|
||||||
}
|
}
|
||||||
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 = time.Duration(i) * time.Minute
|
cwm.Duration = time.Duration(i) * time.Minute
|
||||||
} else {
|
} else {
|
||||||
cwm.Duration = 0 * time.Minute
|
cwm.Duration = 0 * time.Minute
|
||||||
|
Loading…
Reference in New Issue
Block a user