Checks orders checks password, too. #134
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reads game.in and players.in to get the passwords from players.in.
A test in a local game ran as shown below. The local game contained game.in, players.in, and orders.3. Players.in had a password for faction 3 of "mypassword". Orders.3 specified a password of "notmypassword". The orders checker detects the error. When the password in orders.3 is changed to "mypassword", the orders checker reports no errors.
L$ ls
game.in orders.3 players.in
L$ grep -A2 'Faction (3)' players.in
Name: Faction (3)
Email: NoAddress
Password: mypassword
L$ cat orders.3
#atlantis 3 "notmypassword"
#end
L$ ../../Atlantis/neworigins/neworigins check orders.3 check.out && cat check.out
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)
Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
*** Error: Incorrect password on #atlantis line. ***
#atlantis 3 "notmypassword"
#end
1 error found!
L$ sed -i s/notmypassword/mypassword/ orders.3
You have new mail in /var/mail/stan
L$ ../../Atlantis/neworigins/neworigins check orders.3 check.out && cat check.out
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)
Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
#atlantis 3 "mypassword"
#end
No errors found.
L$