Fixed getting game/replay id from /savereplay cmd argument #3226
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 is the port of fixes FA-mods/SupremeScoreBoard#20.
Previously
/savereplay
cmd arg had a format ofgpgnet://localhost/uid/username.SCFAreplay
, but in FAForever/downlords-faf-client@1ae6c7e#diff-3d47503b30b47f5a259049a2e45e1eb555b502bd1f9cc68c936394a0d8fc6f1fR192 it has been changed togpgnet://localIp:localReplayPort/uid/username.SCFAreplay
, what leads a bug when in theID
text in score board instead of replayid there is local replay port ("magic number"20
instring.find(url, "/", 20)
andstring.sub(url, 20, lastpos-1)
is for length ofgpgnet://localhost/
) ¯_(ツ)_/¯This PR fixes this bug.