1619 Commits

Author SHA1 Message Date
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.
v3.6.0
2024-10-05 16:09:37 +02:00
Lion Kortlepel
b04c5068ea
bump version 2024-10-05 16:09:02 +02:00
Lion
077bb6b1cd
Add player limit bypass to onPlayerAuth (#372)
With this PR, returning 2 in onPlayerAuth will allow the player to join
without checking if the server is full. This makes it easier for plugin
developers to allow for example their staff to join without having to
change the max player count.
2024-10-05 16:07:53 +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
Tixx
f039f57f11 Fix error messages on sendnotification 2024-10-04 20:24:30 +02:00
Lion Kortlepel
5d34090952
fix stupid read size error leading to corrupt zip 2024-09-29 01:34:38 +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
Lion
55f1a3c734
Add MP.Get (#369)
Adds `MP.Get(ConfigID)` to the lua api to get the current server
settings.

```lua
lua> print(MP.Get(MP.Settings.Name]))
[LUA] BeamMP Server
lua> MP.Set(MP.Settings.Name, 'Hello World')
[INFO] Set `Name` to Hello World
lua> print(MP.Get(MP.Settings.Name))
[LUA] Hello World
```

Closes #146
2024-09-28 20:30:14 +02:00
Tixx
bb3c762d68 Add player limit bypass to onPlayerAuth 2024-09-28 14:52:04 +02:00
Tixx
3ade7f5743 Add MP.SendNotification 2024-09-28 13:35:25 +02:00
Tixx
9d44c2063c Remove break after return 2024-09-22 15:34:13 +02:00
Tixx
17185da53b Add MP.Get 2024-09-21 23:17:08 +02:00
Tixx
623dfa17d5 Remove expiry check and add braces 2024-09-20 14:45:41 +02:00
Lion
7f69e336a9
Fix exception propagation on packet decompression (#365) v3.5.1 2024-09-20 11:39:36 +02:00
Lion
f08dfc0585
fix MaxPlayers setting using value of MaxCars (#367) 2024-09-20 11:39:22 +02:00
Deer McDurr
a9dee2bec5
fix MaxPlayers using value of MaxCars 2024-09-19 22:15:12 +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
Lion Kortlepel
530d605bc1
fix release v3.5.0 2024-09-19 01:54:16 +02:00
Lion
63b2a8e4a3
Add post event(s) (#364)
Adds `post*` events which are triggered after the respective `on*` event
has completed and the results have been sent.

They have the same arguments as the `on*` function, with the exception
that another argument is added in the beginning which contains whether
the `on*` variant was cancelled.
2024-09-19 01:37:17 +02:00
Lion
a7a19d9a30
Fix disconnect not calling onVehicleDeleted (#336)
OnDisconnect sent a packet to the client, which was already
disconnected.
2024-09-18 18:08:46 +02:00
Lion Kortlepel
3068a0e5c4
add back car deletion 2024-09-18 16:46:11 +02:00
Lion Kortlepel
f70514a021
add postVehicleEdited
why the fuck is it in past tense
2024-09-18 16:34:56 +02:00
Lion Kortlepel
94768c916d
add postChatMessage 2024-09-18 16:30:49 +02:00
Lion Kortlepel
86b37e8ae1
move postPlayerAuth later again, after client insert 2024-09-18 16:26:26 +02:00
Lion Kortlepel
8f9db10474
move postPlayerAuth to after kick 2024-09-18 16:26:20 +02:00
Lion Kortlepel
afa5a04043
add postPlayerAuth 2024-09-18 16:26:16 +02:00
Lion Kortlepel
4444be0af9
add postVehicleSpawn event 2024-09-18 16:26:11 +02:00
Lion
5f7207bc52
Move toml11 out of vcpkg since the toml11 authors broke it (#352) 2024-09-18 16:18:38 +02:00
Lion Kortlepel
9927d2befb
add toml11 submodule 2024-09-18 15:58:55 +02:00
Lion Kortlepel
60f88916a9
remove toml11 from vcpkg.json 2024-09-18 15:51:11 +02:00
SaltySnail
0cc73e70c9 fix onVehicleDeleted not being triggered when onVehicleSpawn is triggered 2024-09-15 20:26:20 +02:00
SaltySnail
bfb2086e05 fix all other places where onVehicleDeleted isn't triggered after a delete packet is sent 2024-09-15 20:26:20 +02:00
SaltySnail
9d67838f8f fix #225 2024-09-15 20:26:20 +02:00
20dka
bbfb85155e fix github workflows
updated upload-artifacts action
2024-09-15 10:25:04 +01:00
Lion
ce5f2e666d
Download Refactoring (#356)
Limits download RAM usage (to zero) on Linux by use of `sendfile(2)`
2024-08-31 20:32:23 +02:00
Lion
e076197ab2
support for non toplevel event handlers (#360)
this change replaces the `_G` event handler lookup with a lua snippet
that fetches whatever the user has set, which could be a module's
function, a builtin global, or even a function defined in the
`RegisterEvent `call
2024-08-31 20:30:02 +02:00
20dka
ee03afb9a1 fix gh linux build 2024-08-29 20:17:01 +02:00
20dka
f775678e2e support for nested lua handlers 2024-08-28 22:46:37 +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
f3627ce0bf
Merge branch 'fix-little-issues' into minor 2024-07-28 10:54:55 +02:00
Lion Kortlepel
e1aaaf5e63
Merge branch 'fix-little-issues' into minor 2024-07-28 10:52:33 +02:00
Lion Kortlepel
a147edd31a
update to toml11 v3.4.1 2024-07-28 10:50:01 +02:00