Skip to content

Commit

Permalink
Fix mapping to EnforcesSecureChat
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamscached committed Nov 10, 2022
1 parent 1c3e8e8 commit f109a4c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions ping_17.go
Original file line number Diff line number Diff line change
Expand Up @@ -1667,9 +1667,11 @@ type Status17 struct {
MaxPlayers int
SamplePlayers []PlayerEntry17

Description Chat17
Icon image.Image
PreviewsChat bool
Description Chat17
Icon image.Image

PreviewsChat bool
EnforcesSecureChat bool
}

// DescriptionText collects text components of Description together into normal string.
Expand Down Expand Up @@ -1876,12 +1878,13 @@ func (p *Pinger) ping17ParseStatusResponsePayload(payload []byte) (*Status17, er

// Map raw status object to response struct (just these parts that can be converted right here)
status := &Status17{
VersionName: statusMapping.Version.Name,
ProtocolVersion: statusMapping.Version.Protocol,
OnlinePlayers: statusMapping.Players.Online,
MaxPlayers: statusMapping.Players.Max,
Description: statusMapping.Description,
PreviewsChat: statusMapping.PreviewsChat,
VersionName: statusMapping.Version.Name,
ProtocolVersion: statusMapping.Version.Protocol,
OnlinePlayers: statusMapping.Players.Online,
MaxPlayers: statusMapping.Players.Max,
Description: statusMapping.Description,
PreviewsChat: statusMapping.PreviewsChat,
EnforcesSecureChat: statusMapping.EnforcesSecureChat,
}

// Process players sample (optionally, if UseStrict, returning on tolerable errors)
Expand Down

0 comments on commit f109a4c

Please sign in to comment.