Page 1 of 1

[Patch] Another Server Save Load Company Password Patch

Posted: 02 Apr 2012 19:29
by Muxyy
Hi,

I found some thread talking about it :

http://www.tt-forums.net/viewtopic.php?f=33&t=34997

http://www.tt-forums.net/viewtopic.php?f=32&t=33106

This patch permits to save and load companies passwords from a file. Very usefull when starting a server from a savegame.

The directory for savegame is used to store the password file.

the filename is made with the game seed and "pwd" as extention (.pwd).

The file is written when a player changes or sets the company password.

The file is read when a network game is started.

Re: [Patch] Another Server Save Load Company Password Patch

Posted: 12 Aug 2012 09:17
by Muxyy
Updated the diff file with last trunk rev 24463.

1. LoadPassword is better called when loading a game (openttd.cpp) instead of starting network game (network.cpp)

2. Fixed NetworkLoadPassword to read the newline char.

3. Added a setting save_password in the [network] section of openttd.cfg

Enjoy ...

Re: [Patch] Another Server Save Load Company Password Patch

Posted: 17 Aug 2012 07:29
by Muxyy
Muxyy wrote:This patch permits to save and load companies passwords from a file. Very usefull when starting a server from a savegame.
Of course when this savegame has already some companies.

The existing protected companies will be protected against automatic company cleaning with no password and against unauthorized clients conections.

The file does not contain the real client password, but something hashed on client side before sending the hashed password to the server.

Re: [Patch] Another Server Save Load Company Password Patch

Posted: 20 Aug 2014 16:54
by Gigigonzalez
Can the patch be updated to current trunk? I have noticed that the patch works but the company passwords are all messed up, some have no password, some have and still work afterwards, and some have a password which is suddenl incorrect. Something is going wrong there.

Re: [Patch] Another Server Save Load Company Password Patch

Posted: 20 Aug 2014 18:57
by Muxyy
Well,

Yes, it depends on the cleaning parameter.

If you activate some automatic company cleaning, the password is not removed from the file and will re reload upon a server restart.

the patch will be updated in few minutes after extracting it from actual 1.4.2.

And also new setting system !

Re: [Patch] Another Server Save Load Company Password Patch

Posted: 20 Aug 2014 19:56
by Muxyy
Yo guys,

updated this patch to r26752 release.

1. use setting "[network] save_password true/false" in server config file.
2. remove password when auto-cleaned by server
3. replace some sprintf with seprintf according to sageguard
4. that's all folks.

Enjoy.

I have also some
1. mandatory password for playing
2. password not allowed

but its server side only in order to use normal release client.

Re: [Patch] Another Server Save Load Company Password Patch

Posted: 21 Aug 2014 15:49
by Gigigonzalez
nice! thanks dude.