more text, make podman
This commit is contained in:
parent
a8c0c96505
commit
c875585c4b
5
Makefile
5
Makefile
@ -10,9 +10,12 @@ endif
|
|||||||
$(PROG): $(GOFILES)
|
$(PROG): $(GOFILES)
|
||||||
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.GitTag=$(GIT_TAG)"
|
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.GitTag=$(GIT_TAG)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f simpbot
|
rm -f simpbot
|
||||||
|
|
||||||
|
podman: $(GOFILES)
|
||||||
|
podman build -t git.saintnet.tech/stryan/$(PROG) .
|
||||||
|
|
||||||
install: $(SIMPBOT)
|
install: $(SIMPBOT)
|
||||||
install -d $(DESTDIR)$(PREFIX)/bin
|
install -d $(DESTDIR)$(PREFIX)/bin
|
||||||
install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin
|
install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin
|
||||||
|
7
main.go
7
main.go
@ -158,11 +158,18 @@ func main() {
|
|||||||
client.SendText(evt.RoomID, "Need a member to subscribe to")
|
client.SendText(evt.RoomID, "Need a member to subscribe to")
|
||||||
}
|
}
|
||||||
vt := body_s[2]
|
vt := body_s[2]
|
||||||
|
var subbed bool
|
||||||
for _, v := range vtubers {
|
for _, v := range vtubers {
|
||||||
if strings.ToUpper(v.Name) == strings.ToUpper(vt) {
|
if strings.ToUpper(v.Name) == strings.ToUpper(vt) {
|
||||||
v.Subs[evt.Sender] = true
|
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":
|
case "help":
|
||||||
client.SendText(evt.RoomID, "Supported commands: info,version,stats,reload,subscribe")
|
client.SendText(evt.RoomID, "Supported commands: info,version,stats,reload,subscribe")
|
||||||
|
Loading…
Reference in New Issue
Block a user