Automatic "reload server"

I’m working on something that generates levels and saves them in logs.
I’ve just figured out it seems that after a while the server file list(?) seems to get outdated and can’t find my log files anymore.

Reloading the server through RC fixes that, so I was wondering if the config file could have an option of reloading the server every once in a while (I’d do it every 30 seconds).

Or maybe if it could reload by itself once a certain number of files have been added to the directories (since it seems to allow a certain number of new files).

I would use cron jobs

I figured out the server does that every 3 minutes.
So I’d only need to change the 3 minutes delay (180) to a 30 seconds delay at line 351 of Tserver.cpp

if ((int)difftime(lastTimer, last3mTimer) >= 30)

Problem is, I can’t figure out how to compile the gserver, what command line is used when compiling?

Windows or Linux?

oops, windows :slight_smile:

Get visualstudio or code::blocks and compile it that way. It will be much easier for you.

In the build directory in the source folder there’s a codeblocks and visualstudio batch file which you run to get the project file for the source.

I stilb get the following errors (which are sensibly the same as I got without the IDE):
undefined reference to ‘boost::system::system_category()’
undefined reference to ‘boost::system::generic_category()’

__
undefined reference to ‘upnpDiscover’
undefined reference to ‘miniwget’
undefined reference to ‘parserootdesc’
undefined reference to ‘GetUPNPUrls’
undefined reference to ‘freeUPNPDevlist’
[…]probably more in that has to do with upnp.

__
undefined reference to ‘_imp___ZN5boost6thread9interruptEv’
[…]and a couple other imps with boost in their names.

I know it has to do with boost, but I’ve just installed it, and the system package and the filesystem package and the thread package.
I even tryed building it with gcc as the toolset… 4 hours later, it still bugs.

But for the upnp stuff… no idea.

There might be missing references to were the library files are stored. Check the project settings for the libs. Also, when you compile boost, make sure to compile it for the right IDE/compiler. VisualStudio libs doesn’t work with Code::Blocks and vice versa.

Should add a project file to the svn

Code::Blocks uses gcc, right?

As default, yes.

I just realised my build of boost didn’t compile any libraries… why is that?!

Try this: bjam --build-type=complete --toolset=gcc stage

It took more than a day to build but the libraries it generated work!

It required these 3 libraries besides the 2 that were included by the .lua file: boost_thread,boost_filesystem and boost_system.

However the program generated requires dlls(?)and is 15mo(???) plus it doesn’t work. It loads servers.txt then crashes.

I took the version that lives in svn\gserver-v2\trunk\server\src…

Did I miss something?

hmm. you could also try to compile without boost

I thought the gserver had a boost dependency o_0

Isn’t boost there so many people can download files at the same time? It’s kinda disapointing not to have it…

I noticed there are many versions of each library, which do you use?

Edit:
Now without boost, it loads the server but closes after a few… it seems to be when it tries to do filesystem_accounts.resync(); since changing the refresh increment makes it crash at different times.

I always compile without boost. All boost does for the gserver is allow you to start multiple servers that are in a text file.

Only if you want to run multiple servers under one binary. There’s a “noboost” batch file in the build directory.

It seems to close because folderconfig is disabled… …working on it…