Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed-by: bjorn.
|
|
Kept the accountserver_startup time for now, since it could be useful.
Reviewed-by: Stefan Beller
|
|
Allows inspection of message data. It is off by default since it consumes
additional bandwidth, but it can be turned on using the net_debugMode option
in manaserv.xml.
Currently the option only affects outgoing data for each host individually.
In particular, enabling this debug mode for the server does not automatically
make the client annotate its messages.
Reviewed-by: Erik Schilling
|
|
Due to a wrong primary key, which covered only the state name, it was
impossible to use the same state name on different maps. This has now
been fixed.
Another problem was that the map variables were being included in the
global variables, because the related database query did not filter on
the map_id column properly. While fixing that, the map_id column now
allows explicitly marking a state variable as global (with the value 0)
or system variables (with the value -1).
System variables are currently not accessible from scripts, but that
could be changed later.
Reviewed-by: Yohann Ferreira
Reviewed-by: Erik Schilling
|
|
* Not nice to pass boolean parameter to constructor for preventing the
timer from running on creation. Just call 'start' on it explicitly.
* getTimeInMillisec could be made static.
Reviewed-by: Yohann Ferreira
|
|
Also, removed the fallback to the standard config file path when a
config file path is specified on the command line. Surely that's not
what you would want to happen.
Reviewed-by: Yohann Ferreira
|
|
Conflicts:
src/game-server/accountconnection.cpp
|
|
log_accountToStandardOutput and log_gameToStandardOutput have been
merged together as log_toStandardOutput.
Reviewed-by: Yohann Ferreira
|
|
It was uneasy to not miss something when updating the db.
And as the db version is somewhat corresponding to a certain
protocol version, adding it in the protocol file sounds relevant
to me, and helps when updating it.
|
|
Just seems a bit more organized to me.
|
|
* Rely on the fact that a std::string is empty by default
* Use std::string::empty() rather than comparing to ""
* Construct with std::string() rather than from ""
Reviewed-by: Bertram
|
|
Reviewed-by: Thorbjorn
|
|
Both servers deinitialize enet now from deinitializeServer().
Reviewed-by: Bertram, Jaxad0127
|
|
|
|
This way, any kind of external service can know about the running
state of each servers, even if only the account server is
updating the statistics because:
1. When the account server is running, each <gameserver> tag is
a running game server. Otherwise, it's not listed.
2. Whenever the account server stops running, the stat file
isn't updated anymore and so the <heartbeat> tag isn't.
3. Game servers without any contact with an account server will
try to reconnect to the account server and kick out every players
so they aren't considered as running in that case.
Reviewed-by: Crush.
Resolves: Mana-mantis #270.
|
|
As the protocol version isn't something the maintainers should
set, I removed the net_clientVersion irrelevant option, replaced
by the corresponding define PROTOCOL_VERSION
in the manaserv_protocol.h file.
A corresponding change in the client will be made.
N.B.: Now, the Enet version is also reported in the log.
Reviewed-by: Jaxad.
|
|
Changes:
============================================================
For the account server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_accountServerAddress,
net_listenHost -> net_accountHost
net_accountServerPort -> net_accountListenToClientPort
net_accountServerPort +1 -> net_accountListenToGamePort
For the game server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_gameServerAddress -> net_gameHost
net_gameServerPort -> net_gameListenToClientPort
For the chat server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
-> net_chatHost
net_accountServerPort + 2 -> net_chatListenToClientPort
Special fallback feature, as requested by Freeyorp:
When the net_accountListenToClientPort (default to 9601)
is set, the 3 others ports will automatically offset from it,
if they're not set, following this rule:
net_accountListenToGamePort = net_accountListenToClientPort + 1
net_chatListenToClientPort = net_accountListenToClientPort + 2
net_gameListenToClientPort = net_accountListenToClientPort + 3
Resolves: Mana-Mantis #216.
Reviewed-by: Jaxad0127.
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|
|
Also made both servers appends on the main log at start
if they aren't empty.
This permits not to lose the previous logs
when quicky restarting the servers.
Trivial fix.
|
|
This patch adds options to enable log rotations
base on files size and or change of date.
Note: Zip support will be added in a second commit.
Reviewed-by: CodyMartin, Thorbjorn.
|
|
Also made some small cleanups.
Resolves: Mana-Mantis #241
Reviewed-by: Jaxad0127.
|
|
Also made random code format clean-ups.
Resolves: Mana-Mantis #217
Reviewed-by: Jaxad0127.
|
|
Also turned the absence of an inter-server password into a fatal
error while documenting it in the manaserv.xml example file.
Reviewed-by: Jaxad0127.
|
|
Now, it's possible to set a different config filename and path
on the command line.
Reviewed-by: Jaxad, Kage.
|
|
Conflicts:
src/account-server/storage.cpp
src/game-server/being.cpp
src/game-server/being.hpp
src/game-server/character.cpp
src/game-server/character.hpp
src/game-server/gamehandler.cpp
src/game-server/inventory.cpp
src/scripting/lua.cpp
src/sql/mysql/createTables.sql
src/sql/sqlite/createTables.sql
|
|
Instead of searching for the configuration file in ~/.manaserv.xml, the
file is now expected to be in the working directory of the server. The
logs and statistics will also be written there.
This should make it easier to run differently configured servers on the
same machine, and should also be a bit more straight-forward to setup.
Reviewed-by: Yohann Ferreira
|
|
I also made it required to start properly since it's now the case.
Reviewed-by: Jaxad0127.
|
|
The new parameters in the manaserv.xml file can be used to do so:
log_accountServerLogLevel
log_gameServerLogLevel
Also, updated the sample manaserv.xml accordingly.
Reviewed-by: Thorbjorn.
|
|
Reviewed-by: Thorbjorn, Jaxad0127
|
|
Instead of loading data from a 'data' directory in the current working
directory, the server now uses clientDataPath and serverDataPath as
specified in the configuration. This removes the need to set up symbolic
links in order to merge these two types of data.
The default values point to example/clientdata and example/serverdata,
where a minimal example world can be developed to make setting up an
initial server quick and easy.
The XML::Document convenience class was copied over from the client.
Also, the ResourceManager is now shared between both servers, since the
account client is reading items.xml.
Reviewed-by: Jared Adams
|
|
|
|
|
|
The only reason it was a DALStorage was because it used to implement the
Storage interface, but that interface got removed a long time ago.
|
|
Also updated the headers to refer to the GPL by URL instead of
suggesting to contact the FSF by snail mail, as per the latest
GPL usage instructions.
|
|
Includes a database update. Use update_6_to_7.sql to update existing
sqlite databases.
|
|
Probably the most important signal to handle gracefully...
|
|
|
|
This was confusing, since changes made to the config file while the
server is running are lost once the server exists. Also, XML comments
were being stripped by the server.
The command line option to set the port now only applies to a single
run, and isn't saved in the configuration. There shouldn't be a need for
the server to write to its configuration file, it might not even have
the rights to do so.
|
|
Needed when the server has multiple network interfaces and the one you
want to use isn't the default one for localhost.
The host to listen on can be set in config file with 'net_listenHost'.
|
|
|
|
The game server crashed when it was closed while it still hadn't been
able to connect to the account server, due to an uninitialized pointer.
Code style fixes. Don't use 'const' for arguments that are passed by
value and start variable names with lowercase.
|
|
|
|
|
|
It was throwing a std::string but nobody was dealing with it. The actual
problem still needs to be fixed. It seems to be having problems with
getting some database version.
|
|
|
|
* Added table definition "tmw_world_states" to store map and world-specific variables
* Extended DALStorage to set and get those new variables
* Applied Kess's diff file from mantis #424 with modifications for PostgreSQL support
|
|
|
|
|
|
|
|
|