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

Screen more kinds of unwanted network messages #1550

Merged
merged 5 commits into from
Jan 17, 2024

Conversation

dgelessus
Copy link
Contributor

Like H-uru/dirtsand#191, but on the client side. This expands plNetClientMsgScreener to also screen messages nested inside other messages, as can happen for avatar messages.

Also disallows receiving any kind of plInputEventMsg over the network - particularly plControlEventMsg, which can execute console commands, like the already blocked plConsoleMsg. This should have no effect on normal gameplay, but will probably break bot effects that modify other clients' fog settings (I haven't tested this though). If this is a problem, we could selectively allow "known safe" console commands instead of blocking everything.

@dpogue
Copy link
Member

dpogue commented Jan 3, 2024

I think the preferred option would be to actual deal with #711 except we're stuck on not having any good receiver for the fog change messages because plFogEnvironment doesn't actually exist in any Ages, and I don't love network messages addressed to global objects or fixed keys like the client 😕

@dgelessus
Copy link
Contributor Author

Broadcast by type could work as a stopgap until we have proper receivers for the fog messages.

In any case, I agree that would be the right solution in the long term. But the bots are currently set up to use networked console commands, and because they're deployed on Cyan's shard, the receiving clients will generally only understand networked console commands and not any new fog messages we might add. So for the time being, I think we're stuck with networked console commands...

Plus, there are other renderer settings that aren't covered by plFogEnvironment, like the clear color, which the bots also want to change.

@Hoikas Hoikas merged commit 1c4c518 into H-uru:master Jan 17, 2024
17 checks passed
@dgelessus dgelessus deleted the net_msg_screener_improvements branch January 17, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants