test
This commit is contained in:
parent
6848fef023
commit
d568ab7078
5
msg.go
5
msg.go
@ -35,10 +35,7 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
|
|||||||
items := []ChatWarsItems{}
|
items := []ChatWarsItems{}
|
||||||
re := regexp.MustCompile(`\n([0-9a-z]+) (.*) x ([0-9]+)`)
|
re := regexp.MustCompile(`\n([0-9a-z]+) (.*) x ([0-9]+)`)
|
||||||
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stock}"), -1) {
|
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stock}"), -1) {
|
||||||
i := getObjItemID(l[1])
|
i := getObjItemID(l[1], l[2])
|
||||||
if i == 0 {
|
|
||||||
getObjItemID(l[2])
|
|
||||||
}
|
|
||||||
q, _ := strconv.ParseInt(l[3], 10, 64)
|
q, _ := strconv.ParseInt(l[3], 10, 64)
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
item := ChatWarsItems{
|
item := ChatWarsItems{
|
||||||
|
2
obj.go
2
obj.go
@ -497,7 +497,7 @@ func getObjItemID(c string, n string) int64 {
|
|||||||
} else {
|
} else {
|
||||||
w := TGCommand{
|
w := TGCommand{
|
||||||
Type: commandSendMsg,
|
Type: commandSendMsg,
|
||||||
Text: fmt.Sprintf("Object unknown : %s\n", s),
|
Text: fmt.Sprintf("Object unknown : %s - %s\n", c, n),
|
||||||
ToUserID64: cfg.Bot.Admin,
|
ToUserID64: cfg.Bot.Admin,
|
||||||
}
|
}
|
||||||
TGCmdQueue <- w
|
TGCmdQueue <- w
|
||||||
|
Loading…
Reference in New Issue
Block a user