65 Commits

Author SHA1 Message Date
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
2dd181d492
gracefully shutdown on bind() failure 2022-05-26 11:19:48 +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
Lion Kortlepel
c1e216957b
move Json* to Util, add Random, RandomRange, RandomIntRange, catch
errors in TPluginMonitor
2022-03-18 01:52:31 +01:00
20dka
3c08e54471 Add basic autocomplete (fix #95) 2022-03-15 01:58:26 +01:00
Lion Kortlepel
7d97c3b560
add FS.ListFiles, FS.ListDirectories 2022-03-02 23:41:32 +01:00
Lion Kortlepel
9a0cdc6517
rename JsonSerialize to JsonEncode, JsonDeserialize to JsonDecode 2022-03-02 13:26:53 +01:00
Lion Kortlepel
b52677e585
Add JsonDeserialize 2022-03-02 13:22:26 +01:00
Lion Kortlepel
7b458e3e27
Use yield() where possible
Replaced calls of this_thread::sleep_* with this_thread::yield(), which
yields the thread to the OS' scheduler.
2022-02-03 19:52:18 +01:00
Lion Kortlepel
754053e73f
Use yield() where possible
Replaced calls of this_thread::sleep_* with this_thread::yield(), which
yields the thread to the OS' scheduler.
2022-02-03 18:57:52 +01:00
Lion Kortlepel
fd12ee672d
Add various debug functions 2022-01-26 20:33:12 +01:00
Lion Kortlepel
3555cec5fe
Simplify fix for event argument bug 2021-12-13 13:48:18 +01:00
Lion Kortlepel
71efe30345
Bump to 3.0.0, possible fix for event argument bug 2021-12-13 13:22:58 +01:00
awesome_milou
9d283738aa
Add preliminary work for HTTP health endpoint (#68)
* Add preliminary work for HTTP health endpoint

* Http: Fix infinite loop bug in Tx509KeypairGenerator::generateKey()

* update commandline

* Add TLS Support class for use with http server

* Add preliminary HTTP Server; TLS still broken; fix in later commit

* Fix TLS handshake, due to server being unable to serve key/certfile in 'Http.h/Http.cpp'; Cause was httlib not being threadsafe due to being a blocking http library

* Run clang format

* Add option to configure http server port via ServerConfig

* TConfig: add HTTPServerPort to config parsing step

* Fix SSL Cert / Key path not auto generating when not existing

* Add health endpoint; Fix SSL Cert serial no. not refreshing when regenerating

* Switch arround status codes in /health route

* Run clang format

Co-authored-by: Lion Kortlepel <development@kortlepel.com>
2021-12-05 18:24:55 +01:00
Lion Kortlepel
479bb9f931
TLuaEngine: Make WaitForAll timeout optional 2021-12-05 01:32:15 +01:00
Lion Kortlepel
a289d0e872
Add timeout to WaitForAll 2021-12-05 01:09:41 +01:00
Lion Kortlepel
265dd710cf
add status command 2021-12-02 01:25:17 +01:00
Lion Kortlepel
19d67dee95
Add GetPlayerIDByName, kick, say 2021-11-29 01:14:37 +01:00
Lion Kortlepel
fc440bea2a
Add ability to switch into other lua states 2021-11-29 00:37:00 +01:00
Lucca Jiménez Könings
1a2a123d87 Fix various macOS compatibility issues 2021-11-25 02:01:44 +01:00
Lion Kortlepel
f8af134dc9
start writing http lua stuff, also heartbeat debug printing 2021-11-08 22:08:07 +01:00
Lion Kortlepel
9eabd19e17
Report more errors, better 2021-10-01 03:52:12 +02:00
Lion Kortlepel
243e96d503
Check all futures 2021-10-01 03:27:24 +02:00
Lion Kortlepel
e7f29ce04f
Fix server event timing 2021-10-01 01:40:37 +02:00
Lion Kortlepel
9d0caf2c7d
Lua: Implement Hot-Reload 2021-09-21 16:21:09 +02:00
Lion Kortlepel
27b5c6d850
Add GetFilename, GetExtension, 2021-09-20 22:45:12 +02:00
Lion Kortlepel
a3a18a3b56
Lua: Add CancelEventTimer 2021-09-20 16:09:17 +02:00
Lion Kortlepel
3edb9322d4
Lua: Simple CreateEventTimer improvements 2021-09-20 13:39:14 +03:00
Lion Kortlepel
4bf89706b4
Lua: Add MP.CreateTimedEvent as CreateThread replacement 2021-09-20 12:43:00 +03:00
Lion Kortlepel
4de80e0c7a
Lua: Remove debug prints, add GetLuaMemoryUsage 2021-09-19 23:55:24 +02:00
Lion Kortlepel
366a7dc9a6
Lua: Add Lua panic handler 2021-09-19 23:34:27 +02:00
Lion Kortlepel
60b86e2be6
Create TLuaChunk constructor to satisfy MSVC 2021-09-19 12:12:38 +02:00
Lion Kortlepel
701e613990
Lua: Fix float printing
Now prints 0, not 0.000000, etc.
2021-09-19 12:10:38 +02:00
Lion Kortlepel
7dbf859529
Lua: Implement event arguments 2021-09-19 11:45:58 +02:00
Lion Kortlepel
38dffc5462
Lua: Pass plugin path and filename to queue for later 2021-09-18 01:20:26 +02:00
Lion Kortlepel
f98ef7d41c
Lua: Call local eventhandlers synchronously when TriggerGlobalEvent is called from inside a handling state 2021-09-18 00:05:51 +02:00
Lion Kortlepel
c2b73d93b5
Lua: Implement more core functions 2021-09-17 12:56:08 +02:00
Lion Kortlepel
9a37ed4341
Lua: Add GetPlayerName 2021-09-17 12:45:34 +02:00
Lion Kortlepel
bac476ec34
Lua: Set package.path and package.cpath before onInit is called 2021-09-17 02:19:45 +02:00
Lion Kortlepel
a44050f0f1
Lua: Almost Working events, all triggers working 2021-09-17 00:21:43 +02:00
Lion Kortlepel
968d9ff999
Lua: Implement most API functions 2021-09-16 19:00:13 +02:00
Lion Kortlepel
1c80a4deb7
Lua: working events, global and local 2021-09-16 18:14:11 +02:00
Lion Kortlepel
e602decb96
Lua: Fix multiple issues with events 2021-09-16 14:58:47 +02:00
Lion Kortlepel
26231c6272
Fix compile issue with asio, implement Lua events 2021-09-16 13:03:00 +02:00
Lion Kortlepel
9b9c18a4c1
Lua: Add variadic print, LuaAPI 2021-09-16 11:54:52 +02:00