Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed-by: Thorbjorn
|
|
Both servers deinitialize enet now from deinitializeServer().
Reviewed-by: Bertram, Jaxad0127
|
|
|
|
Reviewed-by: Freeyorp.
|
|
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.
|
|
It was too close from the Position class and it leads to
making the server handle one or another type through the
code. Still bugged me many times while making changes.
Reviewed-by: Jaxad.
|
|
Trivial.
|
|
Resolves: Mana-Mantis #278.
|
|
I turned the vector storing character data into a map,
keeping the character's slot.
Fixed a memleak along the way.
Reviewed-by: Crush.
|
|
The @mute, @goto, @attribute and @announce commands now logs transactions
to the database.
Added new transaction codes to database. I've preliminarily added a lot
of codes for not yet supported commands so that we needn't do a database
update with every single commit which implements one.
Also using the equivalent "say" helper function in place of the
"GameState::sayTo" method in the command handler.
Reviewed-by: Kage
|
|
|
|
Resolves: Mana-mantis #269.
Reviewed-by: Jaxad0127.
|
|
(Readable in the log with debug level.)
Reviewed-by: Jaxad0127.
|
|
Reviewed-by: Jaxad0127.
|
|
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.
|
|
Reviewed-by: Jaxad0127.
|
|
the public one.
|
|
|
|
Instead, let's use the actual rule: Id > 0.
Trivial fix.
|
|
Trivial also.
|
|
Trivial.
|
|
Since it's what is done for the other files in the project.
Trivial fix.
|
|
Reviewed-by: Bertram
|
|
Reviewed-by: CodyMartin.
|
|
Trivial fix.
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|
|
Trivial fix.
|
|
When registering or logging, The client is hashing the password
for sending it safely. And the server is hashing it also
to store it the same way. Hence, the password ends hashed twice,
which is correct because the server can't trust the client anyway.
At unregister attempt, the server wasn't hashing the password
before comparing it.
Also while on it, I made the corresponding SQL query use the try catch
method and only delete the account in memory when it's also done
on the Db.
Reviewed-by: thorbjorn, Freeyorp.
|
|
Mainly for consistency with the client, and the general consensus was
that these numbered versions were clearer.
|
|
No need to fiddle around with "startTransaction" booleans now that the
helper class is a little more intelligent. When the database is already
performing a transaction, no new one will be started.
|
|
Avoids having to remember to call rollbackTransaction and makes
transactions exception-safe (since the destructor of PerformTransaction
will be called when an exception is thrown).
|
|
This message can contain a lot of small database updates, which at least
on my system are way more efficient when performed in a transaction (now
it takes no more than 1 second vs. about 14 seconds before). Not saying
this is normal, my guess is that it's due to using full partition
encryption.
I've also prevented the thing from entering an infinite loop in the case
of a wrong message, and corrected some variable names.
|
|
This is for developing/testing an experimental new resource manager that
downloads only the files it needs on demand.
Currently only used by the Mana Mobile project. Regular Mana client
ignores the setting.
Reviewed-by: Jared Adams
|
|
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.
|
|
Reviewed-by: Bertram
|
|
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.
|
|
Reviewed-by: Thorbjorn.
|
|
Also moved the trim() function into the utils namespace
where it belongs more, and made some random code cleanups.
Reviewed-by: Thorbjorn.
|
|
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.
|
|
Reviewed-by: Freeyorp, Thorbjorn.
|
|
Now, it's possible to set a different config filename and path
on the command line.
Reviewed-by: Jaxad, Kage.
|
|
attributes and attribute respectively.
|
|
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
|
|
|
|
Was causing the account server to crash when using MySQL backend.
Mantis-issue: 188
Reviewed-by: Yohann Ferreira
|
|
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
|
|
made to mainline
|