Commit Graph

23 Commits

Author SHA1 Message Date
David Markowitz
5942182486
feat: Abstract Logger and simplify code (#1207)
* Logger: Rename logger to Logger from dLogger

* Logger: Add compile time filename

Fix include issues
Add writers
Add macros
Add macro to force compilation

* Logger: Replace calls with macros

Allows for filename and line number to be logged

* Logger: Add comments

and remove extra define

Logger: Replace with unique_ptr

also flush console at exit. regular file writer should be flushed on file close.

Logger: Remove constexpr on variable

* Logger: Simplify code

* Update Logger.cpp
2023-10-21 16:31:55 -07:00
David Markowitz
040a78c386
fix: Remove usage of rand() and seed randomness for chatserver (#1152)
* Remove usage of rand(), time(0) to time(NULL)

Replace it with the random engine mt19937.
convert time(0) to time(NULL)

* update

* revert a bunch of changes
2023-08-03 21:38:19 -05:00
David Markowitz
33c12f3bc5
Fix bounds check (#1071)
Fix Chat Crash

Update CMakeVariables.txt

Add checks for all servers
2023-05-06 13:32:53 -05:00
Aaron Kimbrell
e297aacc68
Breakout message identifiers (#1065)
and make them scope enums
2023-05-03 16:38:32 -05:00
David Markowitz
3f1b4339f5 Improve chat and Auth
Also change most uses of int to specified lengths.
2022-12-16 02:24:02 -08:00
EmosewaMC
4775dbf27f Condense frame rates 2022-12-15 19:55:07 -08:00
EmosewaMC
e1cc25759e Merge remote-tracking branch 'upstream/main' into ServerShutdown 2022-12-15 18:43:28 -08:00
David Markowitz
b7341c8106
Resolve warnings, change config init order and remove unused Game variables for all servers (#877)
* Resolve warnings and change init order

Initialize dConfig first, before logger so we know whether or not to log to console
Initialize namespace Game variables to nullptr so they are a known value if accessed before initialization.
Removed unused Game variables
Replaced config with a pointer instead of referencing something on the stack.
Assign return values to system calls to silence warnings.

Tested that the server still compiles, runs and allows me to load into the game.

* Only start Master of config files exist

Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
2022-12-15 08:13:49 -06:00
EmosewaMC
1afe717563 Properly exit
Properly exit based on the path taken to shutdown master.

Tested that shutting down through sigint or sigterm returns -1
Tested that a segfault exits the program properly
Need to test that players who are trying to connect while master is shutting down are not able to spawn more child worlds.
2022-12-15 05:46:03 -08:00
EmosewaMC
435761f64b Improve shutdown 2022-12-15 04:14:00 -08:00
EmosewaMC
a14e16237b Only start Master of config files exist
Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
2022-12-06 19:30:43 -08:00
EmosewaMC
46f085eb4b Resolve warnings and change init order
Initialize dConfig first, before logger so we know whether or not to log to console
Initialize namespace Game variables to nullptr so they are a known value if accessed before initialization.
Removed unused Game variables
Replaced config with a pointer instead of referencing something on the stack.
Assign return values to system calls to silence warnings.

Tested that the server still compiles, runs and allows me to load into the game.
2022-12-06 04:39:09 -08:00
David Markowitz
18a0ae599b
Add bandwidth limit of 10kb/s(#863) 2022-12-05 16:08:47 -08:00
Jonathan Romano
f8f5b731f1
Allow servers to be run from directories other than build. Read/write files relative to binary instead of cwd (#834)
Allows the server to be run from a non-build directory.  Also only read or write files relative to the build directory, regardless of where the server is run from
2022-11-27 03:59:59 -08:00
Aaron Kimbrell
353c328485
compile fixes and default client_location (#809)
* support for gcc9 on ubuntu 18.04
This is needed to make filesystem work

* fix default for client location
2022-11-02 22:05:52 -05:00
Jett
4a6f3e44ee
Add support for packed clients (#802)
* First iteration of pack reader and interface

* Fix memory leak and remove logs

* Complete packed asset interface and begin on file loading replacement

* Implement proper BinaryIO error

* Improve AssetMemoryBuffer for reading and implement more reading

* Repair more file loading code and improve how navmeshes are loaded

* Missing checks implementation

* Revert addition of Manifest class and migration changes

* Resolved all feedback.
2022-11-01 13:21:26 -05:00
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05:00
Aaron Kimbrell
e97ae92624
Make logger automatically put a newline (#675)
at the end of the line
remove all the newlines in log calls
2022-07-24 21:26:51 -05:00
EmosewaMC
1efbe2d2c0 added returns 2022-04-09 15:57:18 -07:00
EmosewaMC
3e60b9db4a Destroying database specifier 2022-04-09 15:35:01 -07:00
wincent
259c236b72 Fixes dlogger PR
When applied this commit fixes the unix build of the previous dLogger PR.
This commit also fixes backwards compatability with config files.
2021-12-13 16:57:43 +01:00
Jett
74742771c4 Added a LogDebug
- Added debug logging
- Created vLog, a root function for all log functions
- Placed failed to load script log under this new LogDebug function
- Updated included config functions
2021-12-11 12:29:34 +00:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00