diff --git a/Makefile b/Makefile index a34ec20..b1b0c82 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,12 @@ endif $(PROG): $(GOFILES) go build -ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.GitTag=$(GIT_TAG)" -clean: +clean: rm -f simpbot +podman: $(GOFILES) + podman build -t git.saintnet.tech/stryan/$(PROG) . + install: $(SIMPBOT) install -d $(DESTDIR)$(PREFIX)/bin install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin diff --git a/main.go b/main.go index 03b0766..791e79b 100644 --- a/main.go +++ b/main.go @@ -158,11 +158,18 @@ func main() { client.SendText(evt.RoomID, "Need a member to subscribe to") } vt := body_s[2] + var subbed bool for _, v := range vtubers { if strings.ToUpper(v.Name) == strings.ToUpper(vt) { v.Subs[evt.Sender] = true + subbed = true } } + if subbed { + client.SendText(evt.RoomID, "subbed") + } else { + client.SendText(evt.RoomID, "could not identify talent to subscribe to") + } case "help": client.SendText(evt.RoomID, "Supported commands: info,version,stats,reload,subscribe")