479 Commits

Author SHA1 Message Date
Tixx
22c0a966bb
Add nettest command 2025-06-21 20:32:25 +02:00
Tixx
731599f16e
Json vehicle state and apply paint packet (#416)
Converts the vehicle stored client side from a raw string to parsed json
data. This allows us to more easily edit the vehicle state serverside,
which I've started using in this PR for updating the state after a paint
packet.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-06-19 17:46:49 +02:00
Tixx
38c6766b2b
Bump version to v3.8.4 2025-06-14 20:14:42 +02:00
Tixx
068f553fa9
Add BEAMMP_PROVIDER_IP_ENV 2025-05-17 01:04:55 +02:00
Tixx
b7cf304d49
Client resource hash database and client resource protection (#430)
# Mod database
This PR adds a local database of mods, which is used to cache mod hashes
and protection status.

## Mod hash caching
Mod hashes will now be cached based on last write date. This will speed
up server startup because only the mods with changes will have to be
hashed.

## Mod protection
You can now protect mods! This will allow you to host a server with
copyrighted content without actually hosting the copyrighted content.
Just run `protectmod <filename with .zip> <true/false>` in the console
to protect a mod. Users that join a server with protected mods will have
to obtain the file themselves and put it in their launcher's resources
folder. The launcher will inform the user about this if the file is
missing.

## Mod reloading
You can now reload client mods while the server is running by using
`reloadmods` in the console. Keep in mind that this is mainly intended
for development, therefore it will **not** force client to rejoin and
neither will is hot-reload mods on the client.

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-05-11 01:32:19 +02:00
Tixx
ea9c808233
Bump version 2025-05-05 23:53:17 +02:00
Tixx
40c8c0c5c2
Add protectmod and reloadmods console commands 2025-04-26 21:15:16 +02:00
Tixx
a5ca50866f
Lowercase lua extension check 2025-04-19 21:59:50 +02:00
Tixx
7db40e068e
Replace obsolete function 2025-04-01 09:43:49 +02:00
Tixx
7a439bb5b9
Add mod hash caching and mod protection 2025-03-31 08:04:15 +02:00
Tixx
6c3174ac08
Add custom IP bind option (#425)
This PR adds an option in the server config to bind to a custom IP.

- [x] Review config comment and make sure that it is not confused with
port forwarding
- [x] Validate IP addresses

---

By creating this pull request, I understand that code that is AI
generated or otherwise automatically generated may be rejected without
further discussion.
I declare that I fully understand all code I pushed into this PR, and
wrote all this code myself and own the rights to this code.
2025-03-29 20:39:02 +01:00
Tixx
3f7cf7a258
Bump version 2025-03-16 08:08:40 +01:00
Tixx
71b8a61c97
Add custom IP bind option 2025-03-15 20:45:48 +01:00
Tixx
2f577a2358
Store vehicles in parsed json 2025-01-25 22:16:06 +01:00
Tixx
bd9b6212e2
Bump version 2025-01-19 13:41:14 +01:00
Tixx
ec21cbbe86
Bump version 2025-01-18 21:40:07 +01:00
Tixx
26f1be0a51
Switch to curl 2025-01-11 22:18:50 +01:00
Tixx
d7e75ae0c7
Fix windows build 2025-01-11 22:18:19 +01:00
Tixx
b4d4967529
Bump version 2024-12-09 09:52:58 +01:00
0R3Z
99136f133a remove sentry leftovers 2024-11-16 19:02:50 +01:00
Tixx
976ab68ca3
Bump version 2024-11-05 23:13:46 +01:00
Lion Kortlepel
e3416804e4
bump version 2024-11-01 12:50:11 +01:00
Tixx
956d6f50e1 Add setting for the information packet 2024-10-14 00:39:12 +02:00
Tixx
6aeb2eb736 Add server identification packet 2024-10-14 00:39:12 +02:00
Lion
4f052a3e0a
Make modlist an empty array by default instead of null (#377)
Related launcher PR: https://github.com/BeamMP/BeamMP-Launcher/pull/136
2024-10-12 21:06:41 +02:00
Tixx
2bf9e7d916 Make modlist [] by default instead of null 2024-10-09 19:42:47 +02:00
Lion Kortlepel
7dd2d89ad9
clarify auth version reject message 2024-10-09 16:48:40 +02:00
Lion Kortlepel
3403c8acba
fix version check on auth 2024-10-09 16:44:38 +02:00
Lion Kortlepel
0a6eecee69
report correct client minimum version to the backend 2024-10-09 16:37:16 +02:00
Lion
cf3985ce00
Add Lua function to get a player's role (#366)
Adds `MP.GetPlayerRole(player_id)` to the Lua API to get a player's role
("USER", "EA", "MDEV", "STAFF", "ET") by their player id.
Currently you can only get someone's role in onPlayerAuth from the
parameters and in onVehicleSpawned and onVehicleEdited from the packet
data, but not in onPlayerJoin for example without storing it.
2024-10-05 16:09:37 +02:00
Lion Kortlepel
b04c5068ea
bump version 2024-10-05 16:09:02 +02:00
Lion
0850cde1fb
Add MP.SendNotification (#373)
Adds MP.SendNotification(message, icon, category (optional) ) to the Lua
api. Uses the newly added "N" packet in the mod.
2024-10-05 16:07:27 +02:00
Lion
611e53b484
Mod hashing + better download (#374) 2024-10-04 23:29:11 +02:00
Lion Kortlepel
88ca17236a
remove two-socket download 2024-09-29 01:15:48 +02:00
Lion Kortlepel
a4b62d013c
implement mod hashing + new download 2024-09-29 00:32:52 +02:00
Tixx
9a0270cb09 Return nil instead of "" when there's no client 2024-09-28 21:05:04 +02:00
Tixx
3ade7f5743 Add MP.SendNotification 2024-09-28 13:35:25 +02:00
Tixx
17185da53b Add MP.Get 2024-09-21 23:17:08 +02:00
Lion Kortlepel
5319c2878a
bump version to v3.5.1 2024-09-19 17:24:57 +02:00
Lion Kortlepel
73f494041a
fix exception propagation on packet decompression 2024-09-19 16:59:17 +02:00
Tixx
caafb216c9 Add MP.GetPlayerRole(player_id) 2024-09-19 07:51:07 +02:00
20dka
45bb6ca6f3 fill out lua EventName 2024-08-28 22:15:57 +02:00
SaltySnail
f5f6b8534d
Add IPv6 support (#349)
Adds IPv6 support.

FreeBSD users beware: From this point forward, you will have to set
`sysctl net.inet6.ip6.v6only=0` so that the BeamMP-Server continues to
work. The server also prints this information.
2024-08-20 20:35:48 +02:00
Lion Kortlepel
e1aaaf5e63
Merge branch 'fix-little-issues' into minor 2024-07-28 10:52:33 +02:00
SaltySnail
012ce08b91 Add proper lua server stacktraces 2024-07-14 03:18:59 +02:00
Lion Kortlepel
eaedeb5324
add IPv6 support 2024-07-12 15:45:50 +02:00
Lucca Jiménez Könings
29f4d0d286 run clang-format 2024-06-26 14:06:06 +02:00
Lucca Jiménez Könings
2451e08b01 update remaining sections of code after merge 2024-06-26 12:31:47 +02:00
Lucca Jiménez Könings
25739cb1bd Merge branch 'minor' into 158-bug-running-settings-help-returns-nothing 2024-06-26 11:43:38 +02:00
Lucca Jiménez Könings
509225f151 Move tests from .h to .cpp 2024-06-26 11:07:46 +02:00