Master server address

Master server address

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Master server address

Post by gramuxius »

Is it possible to change the address where the clients looks for the master server? I had a quick look around the code, but couldn't seem to find anything relevant.
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Post by Cheesecan »

Yes it's possible, search for taspring.clan-sy.com, you'll find it in reference to the server in one of the files it'll have a comment for localhost.

By the way have you had any luck with getting the server going, if so how did you configure the settings.txt?
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

Gah, I didn't think that it might have been aliased. Just searched for the canonical name the server tried to connect to.

The server runs as far as connecting to a database and starting the main loop. I haven't gotten around to redirecting a client to test the rest. I used the settings.txt from the included examples. Just changed the username, password and stuff to run on my own mysql-server.

For the future, it might be an idea to be able to support different databases, at least sqlite or some other light stuff.
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

Oh, wow. SpringClient/Constants.cs is just hardcoded settings all the way. :)

Edit:
Right, I'll just have to route the traffic to my linux box and redirect to localhost there. Fun.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

gramuxius wrote:Oh, wow. SpringClient/Constants.cs is just hardcoded settings all the way. :)

Edit:
Right, I'll just have to route the traffic to my linux box and redirect to localhost there. Fun.
Change it! =)

We should make note of that and remove it at some point. Nothing should be hardcoded IMO.
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

Yes, setting should generally be in a config file. I don't think I have any compiler that will handle the C#-stuff, however, so I'm limited to external hacking.

But if someone else feels like compiling a version with localhost instead of taspring.clan-sy.com...
jouninkomiko
Posts: 436
Joined: 26 Aug 2004, 08:11

Post by jouninkomiko »

you also need mysql running in order to use the server. in settings.txt you'll need to specify the database, user, and password needed to access the database as well as the name of the table user information is found in. quick question, why do you want to run your own server? especially through localhost?
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

jouninkomiko wrote:you also need mysql running in order to use the server. in settings.txt you'll need to specify the database, user, and password needed to access the database as well as the name of the table user information is found in. quick question, why do you want to run your own server? especially through localhost?
He got the server to compile in linux, and he wanted to test it. :P
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

Yep, it appears to be working. I had forgotten all about the hosts file, which does the redirecting quite nicely.
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Post by Cheesecan »

How is the syntax of the file, when I tried it said it connected to the database but it never created any entries when I registered. Might've been the fact that I was running an older version of mySQL, i'll need to retry it with the latest sometime.
gramuxius
Posts: 9
Joined: 02 May 2005, 16:16

Post by gramuxius »

From the latest version in svn (https://lolut.utbm.info/svn/taspring_linux/trunk/server):

settings.txt

[Server]
{
[Mysql]
{
User=taspring;
Password=taspring;
Database=taspring;
UserTable=srv_user;
}
port=4897;
}

The database should contain this table:

DROP TABLE IF EXISTS `srv_user`;
CREATE TABLE `srv_user` (
`Username` char(16) NOT NULL default '',
`FormattedName` char(16) NOT NULL default '',
`Password` char(16) NOT NULL default '',
PRIMARY KEY (`UserName`)
)
Post Reply

Return to “Engine”