Skip to content

Commit

Permalink
mcman: show online status when listing
Browse files Browse the repository at this point in the history
  • Loading branch information
andreykaipov committed Jan 5, 2024
1 parent aabd178 commit 13c30b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/mcmanager/command/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ uptime: %s
case ".list":
var servers []string
for _, server := range c.serverConfig.Servers {
servers = append(servers, fmt.Sprintf("%s:%s", server.host, server.port))
status := "offline"
if server.online {
status = "online"
}
servers = append(servers, fmt.Sprintf("%-10s%s:%s", "["+status+"]", server.host, server.port))
}
msg = strings.Join(servers, "\n")
case ".info":
Expand Down

0 comments on commit 13c30b5

Please sign in to comment.