Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More accurate server safety status #177

Open
WRF5riNr opened this issue Aug 29, 2022 · 7 comments
Open

More accurate server safety status #177

WRF5riNr opened this issue Aug 29, 2022 · 7 comments
Assignees
Labels
confirmed Confirmed bug/approved suggestion enhancement New feature or request

Comments

@WRF5riNr
Copy link

WRF5riNr commented Aug 29, 2022

Suggestion

As documented, on servers with the FreedomChat or No Chat Reports plugin, "Users who have No Chat Reports on the client will get a yellow ℹ️ icon near chat input box."

screenshot

However, the text shown from the yellow ℹ️ icon is not accurate in this scenario - the server does block chat reports; vanilla clients won't display unsigned messages as "Not Secure" and will show them regardless of "Only Show Secure Chat".

My proposal is to determine if the server blocks chat reports and display the appropriate server safety status. If yet to be determined, then a [?] icon can be displayed.

Possible ways to check

Watch for chat messages

  • Wait for the player to send a chat message. If the content of the sent chat message appears in the chat box as a server message, and the player's name is within the first few chars of the line, then the server is known to block chat reports.
  • If any message from the player or other player appears in the chat box as a player message, then the server is known to not block chat reports.

Check server plugins

  • Do a quiet "/plugins" command and see if "FreedomChat" or "No Chat Reports" appears.
  • Also possible to check the tab completion commands list (though neither FreedomChat nor No Chat Reports as of now have any commands).

Communicate with plugins

Alternative suggestions

Manually

Instead of checking, a way can be added to manually mark the server as 'blocking chat reports'.

Change the text

For example (additions in italic; removals in strikethrough):

"This server does not prevent chat reports, but allows you to send unsigned messages which cannot be reported to Mojang. If the server is not preventing chat reports, vanilla clients will still send signed messages be vulnerable from their signed messages, display unsigned messages as "Not Secure" and not show them if "Only Show Secure Chat" is enabled in chat options."

Reason for suggesting

I would like to recommend to others/ distribute this mod to my players (on a server with FreedomChat plugin), but

  • Distributing it to them would mean that they will get inaccurate information about my server (while chat reports are blocked)
  • Not distributing it to them would mean that they won't get inaccurate information about my server (while chat reports are still blocked)

Apart from that, I think the mod would just be overall better for its users if the information displayed by it was accurate.

@WRF5riNr WRF5riNr added the enhancement New feature or request label Aug 29, 2022
@WRF5riNr WRF5riNr changed the title More accurate information icons More accurate server safety status Aug 30, 2022
@Aizistral Aizistral added the confirmed Confirmed bug/approved suggestion label Aug 30, 2022
@Aizistral
Copy link
Member

Aizistral commented Aug 30, 2022

I am already taking steps in this direction. As of the next release plugin developers will be able to directly mark server as blocking chat reports in the eyes of NCR: https://github.com/Aizistral-Studios/No-Chat-Reports/wiki/How-to-Get-Safe-Server-Status

Heuristic approach is something I consider implementing later.

@Madis0
Copy link
Collaborator

Madis0 commented Aug 30, 2022

I previously had an idea of using heuristics, but Aizistral was afraid of

I want safety status to be relatively persistent for a given server configuration, not flip between states depending on available information
Using vanilla methods relies to heavily on making far-fetched assumptions about correlation between information you have and information other players have

the metrics I suggested included

  • more than one player online
  • messages that look like chat exist (use the way vanilla can hide non-standard player messages in Social Interactions or regex)
  • no normal chat messages
  • vanilla report button is disabled

= safe

Related: #123 and https://discord.com/channels/757941072449241128/992979156767883375/998639633216843786 (in the mod's Discord)

@KaspianDev
Copy link

KaspianDev commented Sep 2, 2022

#183 I'd be happy to add compability to my plugin, but I see no way of doing so right now, at least not for plugins.

Edit: I figured out a way, it'll be added in new version of my plugin

@Madis0
Copy link
Collaborator

Madis0 commented Oct 23, 2022

In terms of heuristics, I've got another idea - would it be possible to check the validity or properties of a chat chain? As in, somehow observe the difference between an emulated chat chain from ViaVersion or similar and a real one from a 1.19.1+ server.

Maybe that could be used as one criterion for marking the server as ✅...

@Aizistral
Copy link
Member

As far as I know, emulated chat from ViaVersion is just conversion of everything to system messages. There's no special characteristic that would distinguish that from other mods and plugins that employ such conversion.

@Madis0
Copy link
Collaborator

Madis0 commented Nov 4, 2022

For the 1.19.3 implementation, I thought of another heuristic that may help: after typing a chat message (and it actually goes through), check whether the message the user just entered is shown as a chat message or system message.

The message would be cached and waited for up to a predefined period, e.g. half a second. If the latency is bigger, just don't use that heuristic.

@IlyaYezelovsky
Copy link
Contributor

Some servers prevent chat reports by stripping the signature, they are still player messages. This like Leaves. So player messages do not mean the server does not prevent chat reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Confirmed bug/approved suggestion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants