Data integrity routines #961
Comments
Buginator uploaded file Does NOT apply, it just shows changes... |
Buginator uploaded file |
Buginator commented Yes, still needs to be cleaned up a bit. |
Giel commented Regarding your problems with [2531] and [2532]. If what you where attempting to do is to hash the binary contents of SCRIPT and SCRIPTVAL files, I suggest you don't. Instead I would suggest that you hash the AST created as a result of parsing these files as that's both more accurate and resilient to CRLF/LF/CR differences (not to mention it allows different comments, etc.). |
Giel commented Also why would you use CRLF as line ending and not LF? ;-) |
Kreuvf commented The data integrity routines aim at comparing "my files" with the files B claims to have, right? And I am for using a line ending that eats one byte only. ;) |
Buginator changed status from |
Buginator changed owner from `` to |
Buginator commented OK fine, I redid the detection routines, and now, it doesn't care if it is CR / CRLF / or LF. Happy now? :P Replying to Warzone2100/old-trac-import#961 (comment:4):
Yes, that is what it does. If Host is running a mod, and players are not, it kicks players. If Host is not running a mod and players are, then it kicks the players that don't match the Host's data. This was done in [8205] & [8206] Trunk version will be done a bit later, when I get more time. |
Buginator commented BTW, I still have to find a better way to handle kicks, since it drops you into the main menu. The same thing happens when you 'quit' a MP game. There is a kick message in the logs, and there is a kick message broadcast to all remaining players though. |
Buginator changed status from |
Buginator set resolution to |
Buginator commented (In [8213]) Data Integrity is reimplemented. Version string has been updated, so the new data checks can work correctly. If all players do not run the same mods or have the same data as the HOST, then they will be kicked. This is done to prevent crashes to the game. Closes #961 |
Buginator removed milestone (was |
Buginator commented Milestone 2.2.4 deleted |
resolution_fixed
type_patch (an actual patch, not a request for one)
| by BuginatorThis is the start of data checking.
Currently, it will only work on platform specific systems. So windows <-> windows, or linux <-> linux but not windows <-> linux.
The reason for this is the current data in the SVN needs to have the EOL set to the same for all platforms--see ML for more details. This could either be CR (mac?) CRLF (windows) LF (linux).
I think it should be set to CRLF since most all utilities are windows based, and those require CRLF to work.
On to the routine. In simple terms, it throws the buffer to the hash routine, and calculates it.
Then when people enter the game, it will kick people out if the data does not match.
A) I don't think we should parse the buffer to strip \r\n (or \r or \n...) just takes up more code and can be easily solved by changing the EOL style on SVN to CRLF.
B) There is a log message for when it kicks you, but you will be dumped back to the main menu. It is the same as if you pressed quit while in-game.
C) This is only phase one of the data integrity routines, more advanced routines are planned. This is mainly meant so people with different mods can't play together, since that tends to screw up games.
D) I am not 100% sure of the endian issues, I think I got them all, but if someone can double check...
Issue migrated from trac:961 at 2022-04-15 19:17:20 -0700
The text was updated successfully, but these errors were encountered: