Page 1 of 2

[solved] BATTLEOPENEX was undocumented

Posted: 13 Mar 2013, 17:40
by abma
Whats with BATTLEOPENEX? its undocumented...

https://github.com/spring/LobbyProtocol/issues/11

for me it makes no sense to implement it until its documented.

the guys who implemented it (i guess aegis & licho) can they please document it?

Re: BATTLEOPENEX is undocumented

Posted: 13 Mar 2013, 20:55
by danil_kalina
The compat flag set on login is "eb"

You will recieve
BATTLEOPENEDEX
with two new arguments between map hash and map name there are 2 new parameters:

- engine name
- engine version

( "Spring" and "91.0" for example )


You can also use OPENBATTLEEX and set those parameters for battles you host.

Re: BATTLEOPENEX is undocumented

Posted: 24 Mar 2013, 17:47
by abma
anyone willing to document it?

Re: BATTLEOPENEX is undocumented

Posted: 24 Mar 2013, 19:14
by danil_kalina
access granted ?

Re: BATTLEOPENEX is undocumented

Posted: 24 Mar 2013, 19:19
by abma
send a pull request? you don't need access...

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 17:04
by zerver
I think BATTLEOPEN/BATTLEOPENED must be removed for these to come into use.

Basically there should be two more columns in the lobby battle list: "Engine" and "Engine version". The lobby should preferably keep all engines in subfolders.

/lobby/maps
/lobby/games
/lobby/spring_91.0/
/lobby/spring_94.0/

etc.

Autodownloading of engines isn't gonna work though, so just need a common place for all engine downloads, e.g. springrts.com/wiki/engines

With this, no need to enforce any versions on the server...

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 17:48
by abma
zerver wrote:I think BATTLEOPEN/BATTLEOPENED must be removed for these to come into use.
no, its kept for backwards compatibility. it could be removed when all lobbies support it.

zerver wrote:Basically there should be two more columns in the lobby battle list: "Engine" and "Engine version". The lobby should preferably keep all engines in subfolders.
zero-k lobby & afaik nota lobby already do this. current version of weblobby should do this, too.
zerver wrote:Autodownloading of engines isn't gonna work though, so just need a common place for all engine downloads, e.g. springrts.com/wiki/engines
you missed some years of development? at least 3 lobbies support engine download!

also, you missed this: http://api.springfiles.com/?category=engine_windows

the common place already exists at http://sourceforge.net/projects/springr ... springrts/ and http://springrts.com/dl/buildbot/default/master/ no wiki page needed...

:-(

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 19:21
by danil_kalina
Done

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 19:27
by abma
many thanks!

(i wanted to do it you / aegis or licho as i have no clue what to talked before it was implemented to uberserver)

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 22:50
by bibim
Thank you danil_kalina, however this patch doesn't specify at all how the lobby server behaves regarding versionned battles and legacy lobby clients which don't handle this protocol extension.

Also, for both new commands OPENBATTLEEX and BATTLEOPENEDEX you specify the two new parameters "engineName" and "engineVersion" as sentence parameters (surrounded by { }, which means they are separated by tab characters), whereas according to uberserver code they are normal parameters (separated by spaces).

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 23:46
by abma
bibim wrote:this patch doesn't specify at all how the lobby server behaves regarding versionned battles and legacy lobby clients which don't handle this protocol extension.
i guess the lobby clients which don't support it just get the normal openbattle data and are likely to desync if lobby server version != autohost version of spring.

Re: BATTLEOPENEX is undocumented

Posted: 25 Mar 2013, 23:59
by bibim
abma wrote:i guess the lobby clients which don't support it just get the normal openbattle data and are likely to desync if lobby server version != autohost version of spring.
Actually it's a bit more complex than this. Iirc, for legacy clients uberserver prefixes the incompatible battle names so that users know the battle isn't compatible with their current version. What would be interesting to know for example is how uberserver decides if 2 versions are incompatible (for some reason it considered 93.1 as incompatible with 93.2...).

Re: BATTLEOPENEX is undocumented

Posted: 26 Mar 2013, 00:02
by abma
i didn't look into the code, but i would think uberserver doesn't decide here anything. clients have to decide if they are compatible by version string they get from lobby server.

Re: BATTLEOPENEX is undocumented

Posted: 26 Mar 2013, 00:04
by bibim
abma wrote:i didn't look into the code, but i would think uberserver doesn't decide here anything. clients have to decide if they are compatible by version string they get from lobby server.
We are speaking of legacy clients here, which don't receive any version string for battles.

Re: BATTLEOPENEX is undocumented

Posted: 26 Mar 2013, 05:27
by danil_kalina
Bibim, you are takeing it too seriously. This is patch, not the coolest protocol ever. Take it easy

Re: BATTLEOPENEX is undocumented

Posted: 26 Mar 2013, 10:20
by bibim
danil_kalina wrote:Bibim, you are takeing it too seriously. This is patch, not the coolest protocol ever. Take it easy
I'm taking it easy, why do you think otherwise?
I don't get what you mean actually... Because it's not a perfect protocol, we shouldn't fix wrong specifications in it?

Re: [solved] BATTLEOPENEX was undocumented

Posted: 26 Mar 2013, 10:25
by koshi
Yeah, wrong documentation is worse than none imo.

Re: [solved] BATTLEOPENEX was undocumented

Posted: 26 Mar 2013, 17:00
by zerver
abma wrote:you missed some years of development? at least 3 lobbies support engine download!
I think it is a security risk, and useless unless it works on all supported OS:s.

Re: [solved] BATTLEOPENEX was undocumented

Posted: 26 Mar 2013, 17:09
by Anarchid
at least 3 lobbies support engine download!
Out of which:
- one is a gpl-violating thing that has rigidly unfixable rules about what counts as spring executable (linux Optimus users? never heard of those)
- one is a windows-only dotnet thing that is mostly a lobby for running a single game (even though it can be told to support others)
- one runs in your browser. oh, wait, did i say "runs"? more like walks. leisurely.

:X

Re: [solved] BATTLEOPENEX was undocumented

Posted: 26 Mar 2013, 18:48
by abma
zerver wrote:
abma wrote:you missed some years of development? at least 3 lobbies support engine download!
I think it is a security risk, and useless unless it works on all supported OS:s.
weblobby, notalobby & pr-downloader works on all os'. also pr-downloader is mostly a lib, so it can be adapted by others.

security risk? i don't see a big difference between typing in an url, download a program, run it and run a lobby which (maybe asks before) downloads a program and runs it.

the problem arises when it happens automaticly and the user can't verify if weird things happen.

yeah, there could be some things improved, like: create file checksums of the generated files already at the buildslaves, so it can be verified if they were modified. the checksum currently is created at springrts.com, so we could only reduce the point were files could be modified from two to one.

users who don't trust have to compile the code their self, but they also have to trust, that the source-code wasn't modified / contains backdoors.

what we should care about is, that spring / lobbies are not remotely exploitable, which practically means: no autohost owner or a lobby client should have the possibility to "infect" others with viruses/worms/trojans (lua scripts count here, too) automaticly.

it always comes to the point, where a user has to trust the program he downloads and runs. We only can help, that users can verify that the code wasn't modified by a 3rd party and our programs should run without system privileges.

Also we can't prohibit, that a users installs and runs malicious code.