commits count
This commit is contained in:
parent
7ef68d3c09
commit
385b99d688
2
bot.go
2
bot.go
@ -820,7 +820,7 @@ func botShops(m *ChatWarsMessage) {
|
||||
|
||||
c := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: fmt.Sprintf("Shops coming (ETA : %ds)", ((len(cfg.Bot.Shops)/len(clts))-1)*4),
|
||||
Text: fmt.Sprintf("Shops coming (ETA : %ds)", (len(cfg.Bot.Shops)/len(clts))*5),
|
||||
FromMsgID64: m.ID64,
|
||||
FromChatID64: m.ChatID64,
|
||||
}
|
||||
|
1
job.go
1
job.go
@ -2079,6 +2079,7 @@ func jobAlchAll(j Job) {
|
||||
rule, err := getMsgParsingRule(m)
|
||||
logOnError(err, "jobAlchAll : getMsgParsingRule")
|
||||
if rule.MsgTypeID64 == cacheObjSubType[`msg_alch_stock_ack`] {
|
||||
|
||||
c := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: "Success.",
|
||||
|
3
main.go
3
main.go
@ -23,6 +23,7 @@ var (
|
||||
initdb = flag.Bool("initdb", false, "initialize bot database")
|
||||
githash string
|
||||
buildstamp string
|
||||
commits string
|
||||
|
||||
db *sql.DB
|
||||
bot *tb.Bot
|
||||
@ -108,7 +109,7 @@ func main() {
|
||||
u := tb.User{
|
||||
ID: int(cfg.Bot.Admin),
|
||||
}
|
||||
bot.Send(&u, fmt.Sprintf("Started (%s - %s)", githash, buildstamp))
|
||||
bot.Send(&u, fmt.Sprintf("Started (%s-b%s - %s)", githash, commits, buildstamp))
|
||||
|
||||
cr = startCron()
|
||||
|
||||
|
6
msg.go
6
msg.go
@ -100,11 +100,8 @@ func parseSubTypeMessageAlchStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
|
||||
cwm := ChatWarsMessageStockAnyAck{}
|
||||
items := []ChatWarsItems{}
|
||||
|
||||
log.Printf("parseSubTypeMessageAlchStockAck : Start\n")
|
||||
|
||||
re := regexp.MustCompile(`\n\/aa_([0-9]{2}) ([a-zA-Z ']+) x ([0-9]+)`)
|
||||
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stuff}"), -1) {
|
||||
log.Printf("parseSubTypeMessageAlchStockAck : %+q\n", l)
|
||||
i := getObjItemID(l[1], ``)
|
||||
q, _ := strconv.ParseInt(l[3], 10, 64)
|
||||
if i != 0 {
|
||||
@ -113,12 +110,9 @@ func parseSubTypeMessageAlchStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
|
||||
Quantity: q,
|
||||
}
|
||||
items = append(items, item)
|
||||
log.Printf("parseSubTypeMessageAlchStockAck : %d - %d\n", i, q)
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("parseSubTypeMessageAlchStockAck : Done\n")
|
||||
|
||||
cwm.Stock = items
|
||||
cwm.Msg = m
|
||||
return &cwm, nil
|
||||
|
Loading…
Reference in New Issue
Block a user