[Patch] Another Server Save Load Company Password Patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Muxyy
Engineer
Engineer
Posts: 15
Joined: 24 May 2011 16:59
Contact:

[Patch] Another Server Save Load Company Password Patch

Post 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.
Attachments
save_company_password_26752.diff
Save Company Password on Server
(5.96 KiB) Downloaded 101 times
Last edited by Muxyy on 20 Aug 2014 20:22, edited 2 times in total.
OpenTTD France - http://www.openttd.fr
Muxyy
Engineer
Engineer
Posts: 15
Joined: 24 May 2011 16:59
Contact:

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

Post 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 ...
OpenTTD France - http://www.openttd.fr
Muxyy
Engineer
Engineer
Posts: 15
Joined: 24 May 2011 16:59
Contact:

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

Post 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.
OpenTTD France - http://www.openttd.fr
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

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

Post 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.
Muxyy
Engineer
Engineer
Posts: 15
Joined: 24 May 2011 16:59
Contact:

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

Post 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 !
OpenTTD France - http://www.openttd.fr
Muxyy
Engineer
Engineer
Posts: 15
Joined: 24 May 2011 16:59
Contact:

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

Post 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.
OpenTTD France - http://www.openttd.fr
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

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

Post by Gigigonzalez »

nice! thanks dude.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 21 guests