vasyahuyasa / remod-sauerbraten

Lightweight mod of sauerbraten server
27 stars 15 forks source link

Adding more three server commands #45

Closed CubeBR closed 5 years ago

CubeBR commented 5 years ago

I'm not sure if the repository is open for contributions, but anyway, I think these three commands are very useful:

COMMAND(getplayermodel, "i"); Returns the number corresponding to the player's playermodel.

COMMAND(gethealth, "i"); Returns the player's health value.

COMMAND(writetofile, "ss"); Creates and writes to a file.

Fohlen commented 5 years ago

Seems fine to me. @vasyahuyasa please approve for merge.

vasyahuyasa commented 5 years ago

@CubeBR hello, PR seems fine except writetofile function, it is too dangerous to allow people write to any file. Also please regenerate docs for this new functions with /src/tools/cubedoc

CubeBR commented 5 years ago

@vasyahuyasa Hello, that's true, I realized that the writetofile command can be really dangerous, so I removed it.

I could not generate the document using the tool in /src/tools/cubedoc, so I did it manually, I hope I have not broken anything... :D