mirror of https://github.com/velour/catbase.git
Compare commits
No commits in common. "338293cf427f8ae811edfeac3f0a14ed72c0ceb6" and "3343a9880220573e697678c89cd426a4e6e47859" have entirely different histories.
338293cf42
...
3343a98802
|
@ -86,8 +86,6 @@ func (p *CounterPlugin) mkIncrementAPI(delta int) func(w http.ResponseWriter, r
|
|||
userName, itemName, delta, item.Count, p.cfg.Get("nick", "catbase"))
|
||||
for _, ch := range p.cfg.GetArray("channels", []string{}) {
|
||||
p.b.Send(p.b.DefaultConnector(), bot.Message, ch, msg)
|
||||
req.Msg.Channel = ch
|
||||
sendUpdate(req, userName, itemName, item.Count)
|
||||
}
|
||||
j, _ := json.Marshal(struct{ Status bool }{true})
|
||||
fmt.Fprint(w, string(j))
|
||||
|
@ -161,12 +159,8 @@ func (p *CounterPlugin) handleCounterAPI(w http.ResponseWriter, r *http.Request)
|
|||
fmt.Fprint(w, string(data))
|
||||
}
|
||||
|
||||
// Update represents a change that gets sent off to other plugins such as goals
|
||||
type Update struct {
|
||||
// Username to be displayed/recorded
|
||||
Who string `json:"who"`
|
||||
// Counter Item
|
||||
What string `json:"what"`
|
||||
// Total counter amount
|
||||
Amount int `json:"amount"`
|
||||
Who string `json:"who"`
|
||||
What string `json:"what"`
|
||||
Amount int `json:"amount"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue