Closed abma closed 9 years ago
other example: SAYBATTLE someuser pelasinkoha eilenkä yhtään
not sure how it is/was encoded, thats hex:
2014-04-25T18:01:35 Handler 0
For the first example, it's the binary GDR (Game Data Report) messages sent in private by SPADS to SLDB for history and TrueSkill computing. For the second example, it's not a message generated by SPADS itself, it's just a message forwarded "as this" by SPADS because it received it from Spring dedicated server.
not sure how to fix the priv msgs, spring should sent them utf-8 encoded i guess...
abma: could you revert the live uberserver to a state in which the msg from spads for sldb still work, until bibim had time to migrate the msg to something ascii encoded? All balancing is currently dependent on those msg. Not having a working balancing system is a big problem for all spring games that use spads! It is esp. problematic for new players.
revert: no, to many stuff would break again
add a workaround: yes, but please fix this soon. invalid utf8 caused problems on client and server side, this is why this code was added.
workarround commit: https://github.com/spring/uberserver/commit/5de8aec8c427804631ef666a3cd6052f82e60b01
(i hope it works...)
workarrounds applied, do the changes work?
when has bibim time to fix the encoding for GDR?
fix should be trivial, at sending side it just needs to encode base64, at receiving site, decode it...
btw: is binary data allowed in SAYDATAPRIVATE? The html documenation of the protocol doesn't state the encoding of messages anywhere (or I didn't see it).
this wasn't discussed, specified, whatever... also * DATA * commands are not implemented.
i would say no, as this is a text-only protocol. what if \n occours in the data?
https://github.com/Yaribz/SPADS/blob/master/src/spads.pl#L5524 $sGdr=encode_base64($sGdr);
and
https://github.com/Yaribz/SLDB/blob/master/slMonitor.pl#L1222 $GDRs{$user}->{data} = decode_base64($GDRs{$user}->{data}); (didn't test, but this is how it could work)
ok, fixed the workarround, should work now, tested it with bytes 0-255 (excluding \n)
Commit 4f375ee makes SPADS >= 0.11.22 use base64 encoding for GDRs (as side effect GDR data transmitted through lobby server will be about 30% bigger).
I will close this issue unless there is still a problem with the messages forwarded "as this" by SPADS from Spring dedicated server to Spring lobby server?
this is not supported by lobbyserver/lobbyprotocol, this is what it sends for example:
user EvoRTSDedicated3 in this case.
SAYPRIVATE SpringLobbyMonitor ��� SZ€³���startTs SZ†›���endTsTeam���type undecided���result�������bots96���engine����������allyTeam����loseTime90.209.151.42���ip254340��� accountId€���winDemoner450���name����team���3���teamgreenys6���name908068��� accountId‚���win1���allyTeam����loseTime105.236.96.55���ip���€���win260762��� accountId_Fire���name����team����ip����loseTime����allyTeam���907154��� accountId‚���win2���team yellowguy���name����loseTime41.135.106.12���ip1���allyTeam�������loseTime2.234.141.78���ip0���allyTeamTheCazziator33���name0���team261133��� accountId‚���win���players �����duration 18815a53534ebbc90ddf560d1cdf4421���gameId1v2��� structure