~exprez135/go-hypixel

ff13f526bfa0ff9bcc5d370f2975f8b9f8e9f048 — Nate Ijams 3 years ago a75ff49 v0.0.17
Fixes continuing bed defence problem.

Missed issues supposed to be fixed in v0.0.16.
3 files changed, 9 insertions(+), 4 deletions(-)

M engine/discord.go
M engine/tracking.go
M main.go
M engine/discord.go => engine/discord.go +6 -1
@@ 409,7 409,7 @@ func listOnline(ctx *exrouter.Context) {
	onlineList := ListOnlinePlayers(guilds)

	if len(onlineList) == 0 {
		ctx.Reply("There are no players online. Do the bed defence yourself, dummy!")
		ctx.Reply("There are no players online. How about you get online?")
		return
	}



@@ 448,6 448,11 @@ func bedDefence(ctx *exrouter.Context) {
	// Fetch list of online UUIDs in the monitored guilds
	onlineList := ListOnlinePlayers(guilds)

	if len(onlineList) == 0 {
		ctx.Reply("There are no players online. Do the bed defence yourself, dummy!")
		return
	}

	// Choose a random UUID
	randomIndex := rand.Intn(len(onlineList))


M engine/tracking.go => engine/tracking.go +1 -1
@@ 215,7 215,7 @@ func SendStatusNotifications(uuid string, newStatus bool) error {

// TODO add error checking
func GetCachedPlayerStatus(uuid string) bool {
	var result = false 
	var result = false

	Iron.View(func(tx *bolt.Tx) error {
		b := tx.Bucket([]byte("tracked"))

M main.go => main.go +2 -2
@@ 7,8 7,8 @@ import (
	"os/signal"
	"syscall"

	"git.sr.ht/~exprez135/go-hypixel/engine"
	//"./engine"
	//"git.sr.ht/~exprez135/go-hypixel/engine"
	"./engine"
)

var platformName = "discord"