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
Lucca Jiménez Könings
73ecef1a87
Move map declarations in Settings.h into .cpp
2024-06-26 11:07:14 +02:00
Lion Kortlepel
105fd6d4c9
rewrite compression and decompression to limit at 30 MB
2024-06-22 22:47:31 +02:00
Lion
33b5384398
Add config setting to allow/deny guests ( #335 )
...
fix #247
2024-06-11 09:01:49 +02:00
Lion
8b94b1f0ef
Add an entry in serverconfig.toml for the time between update reminders ( #329 )
...
fix #321
2024-06-10 22:59:09 +02:00
SaltySnail
5dab48af92
fix #247 , add allow guests config setting.
2024-06-10 22:06:09 +02:00
SaltySnail
f3060f5247
change default from 3h to 30s
2024-06-08 20:24:46 +02:00
sla-ppy
cee039d922
Merge branch 'BeamMP:minor' into fix_303
2024-05-30 19:15:06 +02:00
sla-ppy
58a7e39419
add more info to return to pkToUser endpoint
2024-05-28 14:15:41 +02:00
SaltySnail
419a951c29
change wrong version number
...
lol
Co-authored-by: Lion <development@kortlepel.com>
2024-05-25 20:45:53 +02:00
SaltySnail
135008a73c
Change time_str to be a reference
...
Co-authored-by: Lion <development@kortlepel.com>
2024-05-25 20:44:51 +02:00
SaltySnail
29c3fed374
fix #321
2024-05-25 20:34:33 +02:00
redracer
eea041e8eb
Fix #326 Arch Compile Issue "copy_n is not a member of 'std';"
...
added #include <algorithm> to Common.h, needed for "copy_n"
2024-05-24 16:10:37 -04:00
Lion Kortlepel
04e8d00daa
fix invalid default initialization in SettingsMap
2024-05-24 09:07:54 +02:00
Lucca Jiménez Könings
d30dccc94a
Separate settings tests
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-21 14:24:44 +02:00
Lucca Jiménez Könings
84f5f95e54
Refactor: feedback from code review
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-21 13:40:33 +02:00
Lucca Jiménez Könings
67db9358e1
Fix concepts related error (for compat with gcc9)
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-21 11:50:46 +02:00
Lion
fd2f713485
bump version
2024-05-21 08:52:05 +02:00
Lucca Jiménez Könings
4c9fbc250a
Change concepts in Settings.set + add test for remaining set overloads
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-17 11:53:51 +02:00
Lion Kortlepel
31ce0cc7de
add unit test + concept constraints for set(string)
2024-05-17 11:08:05 +02:00
Lion Kortlepel
3a8f4ded29
fix errors in Settings::set
2024-05-17 10:50:50 +02:00
Lucca Jiménez Könings
f567645db6
Add issue with implicit argument type conversions for Settings.set()
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-15 13:40:25 +02:00
Lucca Jiménez Könings
a5e3fc8fb9
Add Sync.h
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-15 12:57:08 +02:00
Lucca Jiménez Könings
bcd4b5a235
Fix Debug asserts on FreeBSD
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-15 12:54:50 +02:00
Lucca Jiménez Könings
8c15b87628
Refactor all references to settings to use new Settings
type
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-15 12:52:09 +02:00
Lion
5f9726f10f
Use hard disconnect instead of ClientKick in timeout ( #320 )
2024-05-11 13:00:25 +02:00
Lion Kortlepel
fcd408970b
always initialize ping timer
2024-05-11 12:44:41 +02:00
Lion Kortlepel
b995a222ff
bump version
2024-05-10 14:57:22 +02:00
Lion
0c740ccedf
bump version
2024-05-08 12:01:33 +02:00
Lion
b0cf5c7838
Fix lua assertions crashing the server ( #198 )
...
The server would crash on a Lua plugin ASSERT() - this now instead
prints an error. May still lead to weird behavior, but less weird than a
crash.
2024-05-08 11:48:56 +02:00
Lion
586510041d
fix TriggerGlobalEvent not passing event arguments correctly ( #307 )
...
This is supposed to close #106 (The code is by @lionkor from
b068a9b48f
)
2024-05-08 11:47:23 +02:00
Lion
1794c3fe45
Add Lua execution profiler Util.DebugExecutionTime()
( #267 )
...
Adds `Util.DebugExecutionTime()`, which returns a table of
`function_name: milliseconds`, in which each function's execution time
is averaged over all time.
You can call this function like so:
```lua
-- event to print the debug times
MP.RegisterEvent("printStuff", "printStuff")
-- prints the execution time of all event handlers
function printStuff()
print(Util.DebugExecutionTime())
end
-- run every 5 seconds (or 10, or 60, whatever makes sense for you
MP.CreateEventTimer("printStuff", 5000)
```
Pretty print function:
```lua
function printDebugExecutionTime()
local stats = Util.DebugExecutionTime()
local pretty = "DebugExecutionTime:\n"
local longest = 0
for name, t in pairs(stats) do
if #name > longest then
longest = #name
end
end
for name, t in pairs(stats) do
pretty = pretty .. string.format("%" .. longest + 1 .. "s: %12f +/- %12f (min: %12f, max: %12f) (called %d time(s))\n", name, t.mean, t.stdev, t.min, t.max, t.n)
end
print(pretty)
end
```
`Util.DebugExecutionTime()` returns a table, where each key is an event
handler function name, and each value is a table consisting of `mean`
(simple average), `stddev` (standard deviation aka mean of the
variance), `min` and `max`, all in milliseconds, as well as `n` as the
number of samples taken.
2024-05-08 11:46:02 +02:00
Lucca Jiménez Könings
c6dac55679
Wrap Settings into synchronization primitives
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:06 +02:00
Lucca Jiménez Könings
37109ae3f1
Make 'General::Debug' setting r/w from runtime
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Lucca Jiménez Könings
f5e2f7425f
Fix ComposedKey
metadata not printing to console
...
Make ComposedKey formattable by overloading fmt::format
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Lucca Jiménez Könings
3989961ff9
Add get
and set
to console command settings
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Lucca Jiménez Könings
a357ff8ca3
Add missing options to defaults
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Lucca Jiménez Könings
86f0052e07
Add rudimentary access control to type Settings
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Lucca Jiménez Könings
89034a64e0
Add logic for new Settings type
...
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Lucca Jiménez Könings
55f5437618
Add new type Settings
& refactor TSettings behavior
...
into Settings by adding getters/setters
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
2024-05-07 18:16:05 +02:00
Neptnium
c605498a2d
Merge branch 'BeamMP:minor' into minor
2024-05-07 08:26:44 +02:00
Lion Kortlepel
5dd4c97ed1
bump version
2024-05-06 14:37:34 +02:00
Lion Kortlepel
2f995a71ae
remove backup1, backup2 endpoints
2024-05-06 12:04:56 +02:00
Lion Kortlepel
cf8f10b949
add --port=value argument
2024-05-06 11:56:26 +02:00
Lion Kortlepel
6f50cad76b
add BEAMMP_PROVIDER_PORT_ENV to allow provider to change which ENV
...
variable the port is fetched from
2024-05-06 11:56:26 +02:00
Lion Kortlepel
234bdf5877
add ENV variable to disable config generation and parsing
2024-05-06 11:46:21 +02:00
Lion Kortlepel
65017d0834
add lua log to test common
2024-04-19 11:35:39 +02:00
Lion Kortlepel
1237e7e533
add lua logging facilities as Util.Log*() functions
2024-04-19 11:10:50 +02:00