351 Commits

Author SHA1 Message Date
Lion Kortlepel
03307e71fb
use a beammp_lua_errorf instead of a std::terminate on sol2 assertion failure 2023-12-05 18:25:27 +01:00
Lion Kortlepel
dea203c108
make IThreaded::~IThreaded virtual to make destruction happen 2023-12-05 18:03:13 +01:00
Lion Kortlepel
e245c9e9e2
fix pps monitor warning about virtual dtor 2023-12-05 18:02:35 +01:00
Lion Kortlepel
667da22b0e
Merge remote-tracking branch 'origin/master' into new-buildsystem 2023-12-05 17:59:05 +01:00
Lion Kortlepel
a6eb2f7bfe
switch to vcpkg+cmake, add debian build to workflows
using lionkor's template (MIT licensed)

This is a combination of 64 commits.
2023-12-05 17:57:19 +01:00
Lion Kortlepel
7f206fd0d4
bump version to 3.1.2 2023-12-03 17:49:12 +01:00
rgnter
222d2492ff
Merge branch 'master' into optimize/add_cv_to_luaresult 2023-03-21 20:17:17 +01:00
Anonymous275
c51cf090ef fix linux build 2023-01-15 17:12:35 +00:00
Anonymous275
d677d8d58d rename Hash function to HashPassword
move HashPassword to cpp only
move check to line 285
2023-01-15 17:12:35 +00:00
Anonymous275
9f59c27b1f - add hash function
- add password config
- add debug messages for password stages
- add pass boolean for heartbeat
- adjust network codes
2023-01-15 17:12:35 +00:00
rgnter
b7b578bf3e add conditional variable to LuaResult 2022-12-18 14:45:33 +01:00
Lion Kortlepel
7f5b3919f4
make destructors of virtual classes virtual
this causes warnings in clang, and rightfully so :^)
2022-10-31 11:31:16 +01:00
Lion Kortlepel
a8b1a205f7
bump version to 3.1.1
I'm expecting to release a 3.1.1 with some fixes
2022-10-31 11:24:13 +01:00
Lion Kortlepel
7d1318653c
fix boost::system::error_code 2022-10-15 23:16:16 +02:00
Lion Kortlepel
cc6b7846b2
add system include 2022-10-06 00:51:51 +02:00
Lion Kortlepel
231b13a0e7
fix a ghost client bug 2022-10-05 18:17:18 +02:00
Lion Kortlepel
7d2e4d4581
replace tcp networking with boost::asio tcp networking 2022-10-05 18:17:04 +02:00
Lion Kortlepel
6e97a3cd6e
switch udp networking to boost implementation 2022-10-05 12:14:25 +02:00
Lion Kortlepel
5d3dff3c88
add identifiers (beammp id, ip) as an argument to onPlayerAuth 2022-10-03 15:31:32 +02:00
Lion Kortlepel
e638c25f70
change assertions to print the error in release builds
this should make it easier to debug crashes in the server remotely in
release builds when sentry is down.
2022-09-26 12:03:57 +02:00
Lion Kortlepel
24c98eb2b2
add more compile-time diagnostics, implement fixes for them
Before, a lot of common errors went unnoticed, due to insufficient
compiler diagnostics. This commit fixes this by adding a lot of new
diagnostics, and fixing the issues found by this.
2022-09-26 12:02:05 +02:00
20dka
b71aa2db04
advanced autocomplete for lua 2022-09-26 00:13:16 +02:00
Lion Kortlepel
36a1da3218
fix TServer::HandlePosition declaration
it was different from the implementation
2022-09-14 20:59:07 +02:00
20dka
a84d042a8a add error messages to some lua events 2022-09-14 12:45:40 +02:00
20dka
44b94c9e58 add MP.GetPositionRaw(pid, vid)
fix vehicles sometimes not deleting for all players
2022-09-14 01:54:49 +02:00
Lion Kortlepel
fd7b11f436
fix event loop timing issue
The event loop tries to run no faster than every 10ms. If it detects
that it goes faster, it would incorrectly calculate the difference, and
then wait (what I assume was) way too long or too short.
Either way, now it's fixed and it correctly works, even when introducing
new lua states.
2022-07-20 14:33:19 +02:00
Lion Kortlepel
51ccf31373
add beammp_debugf 2022-07-14 01:38:35 +02:00
Lion Kortlepel
a2cc629153
add onFileChanged (fixes #116) 2022-07-14 01:18:50 +02:00
Lion Kortlepel
ad414ec5c9
call onInit on hot-reload, cleanup, remove warnings
onInit is now called on hot-reload, for the whole plugin. Arguably, this
is not expected behavior, since only one file is being reloaded, but
this is the easiest way to do it, and the entire hot-reload process is
only for development purposes. Open an issue if this breaks your stuff
:^)
2022-07-14 00:37:47 +02:00
Lion Kortlepel
0a8e7d8e50
add TriggerLocalEvent 2022-07-14 00:27:44 +02:00
Lion Kortlepel
6e46d5aca9
start building the clear command 2022-06-28 03:29:01 +02:00
Lion Kortlepel
817bd4b588
start fixing mod download 2022-06-28 03:20:42 +02:00
Lion Kortlepel
25391fa0c7
thank you toml11 maintainer for naming your header some super generic name that clashes with every single other toml library B) 2022-06-04 16:51:34 +03:00
Lion Kortlepel
0621c0bf82
rebase fixup 2022-05-26 21:13:18 +02:00
Lion Kortlepel
36547d1e9e
Move PluginMonitor out of TLuaEngine 2022-05-26 20:59:53 +02:00
Lion Kortlepel
f06f31c2a0
add moar tests!!! 2022-05-26 16:58:13 +02:00
Lion Kortlepel
00f156cb86
start adding tests 2022-05-26 13:02:09 +02:00
Lion Kortlepel
a0876ed58c
update submodules, remove ssl crap 2022-05-26 11:59:36 +02:00
Lion Kortlepel
4f69ca1ad0
remove ssl code
@jimkoen

This was removed because, as useful and as much work as this was, we
can't reasonably take responsibility for this. Instead, a server like
this should *always* be localhost only, and if it's not, it should be
behind an nginx reverse proxy anyways. We're removing the config options
regarding this in one of the next commits.
2022-05-26 11:54:19 +02:00
Lion Kortlepel
2dd181d492
gracefully shutdown on bind() failure 2022-05-26 11:19:48 +02:00
Lion Kortlepel
88f1976668
Merge branch 'rc-v3.0.2' into rc-v3.1.0 2022-04-28 14:40:57 +02:00
Lion Kortlepel
974dda9f8b
HTTPServer: Add config value to specify listen IP
Change default IP to localhost,
Set default SSL to false due to this.
2022-04-28 14:12:26 +02:00
Lion Kortlepel
0979c8b1e4
HTTPServer: Attempt to catch more errors 2022-04-28 14:04:54 +02:00
Lion Kortlepel
0761036c8c
TConsole::StartLoggingToFile: implement 2022-04-28 13:46:25 +02:00
Lion Kortlepel
d8c33c03ee
start work on new logger 2022-04-05 22:27:45 +02:00
Lion Kortlepel
1bab3276e9
fix setsockopt SO_SNDTIMEO for windows, bump version number to 3.0.2, update commandline 2022-04-05 10:59:16 +02:00
Lion Kortlepel
450f0a6875
Fixup merge 2022-03-31 22:17:10 +02:00
Lion Kortlepel
104737571c
Merge branch 'rc-v3.0.2' into rc-v3.1.0
This is a periodic merge to keep 3.1.0 up to date with 3.0.2
2022-03-31 22:10:49 +02:00
Lion Kortlepel
d4b30a2583
CreateEventTimer: Implement CallStrategy
There are two CallStrategies:

- BestEffort (default): Will try to get your event to trigger at the specified
  interval, but will refuse to queue handlers if a handler takes too
  long.
- Precise: Will enqueue event handlers at the exact interval specified.
  Can lead to the queue filling up if the handler takes longer than the
  interval.
2022-03-31 20:13:59 +02:00
Lion Kortlepel
b97397132d
TLuaEngine: improve result queue handling 2022-03-31 15:59:31 +02:00