1272 Commits

Author SHA1 Message Date
Anonymous-275
8c967a5608 test state commit 2023-06-23 08:09:56 +01:00
Anonymous-275
57a58b1a38 fix hang and crash caused by client kick 2023-04-24 11:41:09 +01:00
Lion Kortlepel
2cf27ad837
potentially fix ghost car bug 2022-12-20 02:56:04 +01:00
Lion Kortlepel
e8ef7de4b9
fix a bug in TriggerLocalEvent which would cause the server to std::terminate()
it was refusing to push multiple return values onto a result table. Not
sure what changed to make this happen, but oh well.
2022-12-19 12:41:45 +01:00
Lion Kortlepel
8ea7b75874
fix sol assert not actually checking the assertion *facepalm* 2022-12-19 12:41:16 +01:00
Lion Kortlepel
59503ccc90
use a beammp_lua_errorf instead of a std::terminate on sol2 assertion failure 2022-12-19 11:52:22 +01:00
Lion Kortlepel
7316dff519
fix not removing client when disconnecting them 2022-11-25 14:40:21 +01:00
Lion Kortlepel
b1a89125fe
fix spinning a single thread in lua result check thread 2022-11-25 14:21:45 +01:00
Lion Kortlepel
4a6504ec2c
fix "disconnect was called twice" error
this would cause players to stick around after being kicked
2022-11-23 09:34:51 +01:00
Lion Kortlepel
b3594dd147
remove invalid naming of settings again
ive added this in what can only be described as complete delirium, as it
makes no sense whatsoever. reverted.
2022-11-23 09:34:51 +01:00
Lion Kortlepel
7cc426cb96
fix reading and defaulting the IncludeSubdirectories config option 2022-11-23 09:34:51 +01:00
20dka
a91eb02f5f
remove debug print 2022-11-23 09:34:51 +01:00
20dka
6b65907a7f
add ID parameter to onPlayerRequestMods and update Changelog.md 2022-11-23 09:34:51 +01:00
20dka
468a6b340e
add event 'onPlayerRequestMods', restructure modloading
now every player has their own list of allowed client mods, this can be modified by lua upon joining and is later used as a whitelist to ensure only those files can be sent to each client
2022-11-23 09:34:51 +01:00
20dka
056827546e
assign IDs to new players earlier in the connection process 2022-11-23 09:34:51 +01:00
20dka
6a47521c7c
fix lua autocomplete crash when a table contains number keys 2022-11-23 09:34:51 +01:00
Lion Kortlepel
eaab5eaf30
fix crash which could happen when closing an invalid socket
for some reason boost::asio doesn't account for this and lets us simply
die when/if this happens.
2022-11-23 09:34:51 +01:00
Lion Kortlepel
35b38f35bb
replace usages of ForEachClientWeak with ForEachClient 2022-11-23 09:34:51 +01:00
Lion Kortlepel
2572530957
ensure clients are valid when iterated over 2022-11-23 09:34:51 +01:00
Lion Kortlepel
8551e68184
fix bug which could cause multiple players to have the same ID (closes #154) 2022-11-23 09:34:51 +01:00
Lion Kortlepel
2f85c708c5
rework GetClient to use new ForEachClient, return shared_ptr
this simplifies a lot of functions, and removes a lot of potential
errors when using the function. You now only check whether the return
value is null, and if it's not, you have a valid, reference-counted,
client pointer.
2022-11-23 09:34:51 +01:00
Lion Kortlepel
844b64f5d9
rework ForEachClient to use concepts instead of SFINAE 2022-11-23 09:34:51 +01:00
Lion Kortlepel
d7369c3bc5
deprecate ForEachClientWeak in favor of new ForEachClient 2022-11-23 09:34:51 +01:00
Lion Kortlepel
a8ad9034b2
update lk-result 2022-11-23 09:34:50 +01:00
Lion Kortlepel
b756ce3c3f
fix formatting in all files 2022-11-23 09:34:50 +01:00
Lion Kortlepel
3f05b72cc2
change internal setting names to set apart categories 2022-11-23 09:34:50 +01:00
Lion Kortlepel
152393f8bf
switch boost variant for std::variant for settings, for sol2 2022-11-23 09:34:50 +01:00
Lion Kortlepel
dd36299436
add lk/result to includes 2022-11-23 09:34:50 +01:00
Lion Kortlepel
da65e97ed1
add lk/result
a header-only library to deal with results
2022-11-23 09:34:50 +01:00
Lion Kortlepel
4cc163ea1c
switch to c++20
this will allow us to use more convenience features of the language, and
leave more legacy code behind - also we can use c++20 libraries ;)
2022-11-23 09:34:50 +01:00
Lion Kortlepel
01bcc3d18c
replace all clocks with a generic TimeType 2022-11-23 09:34:50 +01:00
Lion Kortlepel
c7f6835702
use high_resolution_clock instead of system_clock 2022-11-23 09:34:50 +01:00
Lion Kortlepel
0327b41611
change to system_clock for times converted to time_t 2022-11-23 09:34:50 +01:00
Lion Kortlepel
48135f4544
add new onShutdown timing to changelog 2022-11-23 09:34:50 +01:00
Lion Kortlepel
0411ba533d
change onShutdown to be called before all players are kicked 2022-11-23 09:34:50 +01:00
Lion Kortlepel
41dd4ff678
add version to changelog 2022-11-23 09:34:50 +01:00
Lion Kortlepel
e1c2d0d5fb
add version command 2022-11-23 09:34:50 +01:00
Lion Kortlepel
69c2868025
fix server not closing after detecting an invalid config (fixes #151) 2022-11-23 09:34:50 +01:00
Lion Kortlepel
c8ca4564a1
fix error which complains about AuthKey not being present before reading the config file 2022-11-23 09:34:50 +01:00
Lion Kortlepel
0c6112c28a
add boost to requirements in README for windows 2022-11-23 09:34:50 +01:00
Lion Kortlepel
4860849f2f
add boost-uuid to vcpkg on windows 2022-11-23 09:34:50 +01:00
Lion Kortlepel
3bd67d959f
handle all exceptions which happen inside a logging macro
and print them ;)
2022-11-23 09:34:50 +01:00
Lion Kortlepel
13a86d3e77
add explanative debug messages to parse errors in GetPidVid 2022-11-23 09:34:50 +01:00
Lion Kortlepel
dff94a41be
fix potential out of bounds exception in GetPidVid 2022-11-23 09:34:50 +01:00
Lion Kortlepel
79ee5915b4
fix unhandled out of bounds in Authentication 2022-11-23 09:34:50 +01:00
Lion Kortlepel
3fcf23977b
fix fix for out-of-bounds crash, add disconnect messages to some failure conditions 2022-11-23 09:34:50 +01:00
Lion Kortlepel
487917482f
fix out-of-range crash in SendFile
when the UnsafeName does not contain a `/`, the server would simply
crash, as an invalid substr() index was given, which triggered a
std::out_of_range.
2022-11-23 09:34:50 +01:00
Lion Kortlepel
2ca39a7368
fix cmakelists 2022-11-23 09:34:50 +01:00
20dka
9d8aeef423
refactor of vehicle packet handling 2022-11-23 09:34:50 +01:00
20dka
dee7f74906
remove unused PPSMonitor parameter 2022-11-23 09:34:50 +01:00