diff --git a/bot.go b/bot.go
index 5c010ff..6f66dc3 100644
--- a/bot.go
+++ b/bot.go
@@ -804,9 +804,9 @@ func botShops(m *ChatWarsMessage) {
Slaves: int64(len(clts)),
Shops: make([]string, 0),
}
- for j, link := range cfg.Bot.Shops {
+ for j, s := range cfg.Bot.Shops {
if (j / len(clts)) == i {
- j2.Shops = append(j2.Shops, link)
+ j2.Shops = append(j2.Shops, s.Link)
}
}
b, err = json.Marshal(j2)
diff --git a/data/config.json b/data/config.json
index 43b5b4a..205c295 100644
--- a/data/config.json
+++ b/data/config.json
@@ -31,7 +31,6 @@
"max_qty": 10000
}
],
- "shops": [ "abcd",
- "0123" ]
+ "shops": [{"username": "user", "link": "abcd" }]
}
}
\ No newline at end of file
diff --git a/def.go b/def.go
index d9252e7..559d74f 100644
--- a/def.go
+++ b/def.go
@@ -45,7 +45,10 @@ type Config struct {
Min int64 `json:"min_qty"`
Max int64 `json:"max_qty"`
} `json:"vault_limit"`
- Shops []string `json:"shops"`
+ Shops []struct {
+ Username string `json:"username"`
+ Link string `json:"link"`
+ } `json:"shops"`
} `json:"bot"`
}
diff --git a/job.go b/job.go
index 2c7ee64..e7b9739 100644
--- a/job.go
+++ b/job.go
@@ -2258,8 +2258,14 @@ func jobShops(j Job) {
}
c := getObjCastle(cwm.CastleID64)
out = fmt.Sprintf("%s%s", out, c.Logo)
- out = fmt.Sprintf("%s%s", out, cwm.Link, cwm.User)
- out = fmt.Sprintf("%s [%d : %d]", out, cwm.Mana, cwm.ManaTotal)
+ for _, s := range cfg.Bot.Shops {
+ if s.Link == cwm.Link {
+ out = fmt.Sprintf("%s@%s", out, s.Username)
+ }
+ break
+ }
+ out = fmt.Sprintf("%s [%d💧]", out, cwm.Mana)
+ out = fmt.Sprintf("%s Visit %s", out, cwm.Link, cwm.User)
if cwm.Mana < cwm.ManaTotal {
d := time.Duration(((cwm.ManaTotal-cwm.Mana)*60)/((cwm.ManaTotal/250)+1)) * time.Second