Add No Chat Report's support output.
Some checks are pending
ci/woodpecker/push/build Pipeline is pending
Some checks are pending
ci/woodpecker/push/build Pipeline is pending
This commit is contained in:
parent
f97258bbd9
commit
ac912af1d9
@ -174,12 +174,20 @@
|
||||
<td>{{ if .Data.AllowModListing }}<a href="{{ .ToggleQuery "mods" }}" title="Toggle Mod List.">{{ end }}{{ .Queried.ModCount }}{{ if .Data.AllowModListing }}</a>{{ end }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ if and .Data.AllowSecureProfileModeDisplay .Queried.SecureProfilesEnforced }}
|
||||
{{ if .Data.AllowSecureProfileModeDisplay }}
|
||||
{{ if .Queried.SecureProfilesEnforced }}
|
||||
<tr>
|
||||
<th>Secure Profiles Enforced</th>
|
||||
<td>{{ .Queried.SecureProfilesEnforced }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ if .Queried.PreventsChatReports }}
|
||||
<tr>
|
||||
<th>Chat Reports Prevented</th>
|
||||
<td>{{ .Queried.PreventsChatReports }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if and .Data.AllowPreviewChatModeDisplay .Queried.PreviewChatEnforced }}
|
||||
<tr>
|
||||
<th>Preview Chat Enforced</th>
|
||||
|
@ -24,6 +24,7 @@ type MC struct {
|
||||
Mods []string
|
||||
SecureProfilesEnforced *bool
|
||||
PreviewChatEnforced *bool
|
||||
PreventsChatReports *bool
|
||||
}
|
||||
|
||||
func (m MC) GetFaviconSRC() template.HTMLAttr {
|
||||
|
@ -59,6 +59,7 @@ func (m Marshal) NewMC() (MC, error) {
|
||||
Mods: CollectMods(r.ModInfo),
|
||||
SecureProfilesEnforced: CollectSecureProfileEnforcement(r2),
|
||||
PreviewChatEnforced: CollectPreviewChatEnforcement(r2),
|
||||
PreventsChatReports: CollectPreventsChatReports(r2),
|
||||
}, nil
|
||||
case "legacy", "legacyjava", "javalegacy", "legacy java", "java legacy", "legacy_java", "java_legacy":
|
||||
r, err := mcutil.StatusLegacy(m.Data.MCAddress, m.Data.MCPort, options.JavaStatusLegacy{
|
||||
@ -88,6 +89,7 @@ func (m Marshal) NewMC() (MC, error) {
|
||||
Mods: nil,
|
||||
SecureProfilesEnforced: nil,
|
||||
PreviewChatEnforced: nil,
|
||||
PreventsChatReports: nil,
|
||||
}, nil
|
||||
case "bedrock":
|
||||
r, err := mcutil.StatusBedrock(m.Data.MCAddress, m.Data.MCPort, options.BedrockStatus{
|
||||
@ -117,6 +119,7 @@ func (m Marshal) NewMC() (MC, error) {
|
||||
Mods: nil,
|
||||
SecureProfilesEnforced: nil,
|
||||
PreviewChatEnforced: nil,
|
||||
PreventsChatReports: nil,
|
||||
}, nil
|
||||
default:
|
||||
return MC{}, errors.New("Invalid MCType")
|
||||
@ -191,6 +194,15 @@ func CollectPreviewChatEnforcement(data map[string]interface{}) *bool {
|
||||
return nil
|
||||
}
|
||||
|
||||
func CollectPreventsChatReports(data map[string]interface{}) *bool {
|
||||
val, ok := data["preventsChatReports"]
|
||||
if ok {
|
||||
toReturn := val.(bool)
|
||||
return &toReturn
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m Marshal) CollectIPv4Port(port *uint16) uint16 {
|
||||
if port == nil {
|
||||
return m.Data.MCPort
|
||||
|
Loading…
Reference in New Issue
Block a user