Few days of someone in the chat complaining that clients get kicked off after a while. This was caused because random debugging was enabled on the server, and as such rarely the right token would be sent back by the client, causing it to get kicked off due to seemingly getting lagged.
Description
Inject "dbg_seed-" or "dbg_sync-" into the network revision string, and check this before checking the hash. This way you'll get a client mismatch, instead of some weird behaviour.
With this running the server/client with debug level of at least 3 will show the revision string, and it becomes clear they mismatch. The extra tokens could be found quite easily, and the user should get the idea that what is being done isn't fully compatible.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
The bug fix is important enough to be backported? (label: 'backport requested')
This PR touches english.txt or translations? Check the guidelines
This PR affects the save game format? (label 'savegame upgrade')
This PR affects the GS/AI API? (label 'needs review: Script API')
ai_changelog.hpp, game_changelog.hpp need updating.
The compatibility wrappers (compat_*.nut) need updating.
This PR affects the NewGRF API? (label 'needs review: NewGRF')
Motivation / Problem
Few days of someone in the chat complaining that clients get kicked off after a while. This was caused because random debugging was enabled on the server, and as such rarely the right token would be sent back by the client, causing it to get kicked off due to seemingly getting lagged.
Description
Inject "dbg_seed-" or "dbg_sync-" into the network revision string, and check this before checking the hash. This way you'll get a client mismatch, instead of some weird behaviour.
With this running the server/client with debug level of at least 3 will show the revision string, and it becomes clear they mismatch. The extra tokens could be found quite easily, and the user should get the idea that what is being done isn't fully compatible.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.