Commit Graph

327 Commits

Author SHA1 Message Date
Lion Kortlepel 5394122d77 add /modlist endpoint, DownloadThreads config option 2022-07-26 17:57:19 +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
Lion Kortlepel d86efabb1a Modernize CMakeLists, automatically update submodules
CMake will now find packages in a modern way (include(Find*)), and will
also ensure that submodules are updated, unless told otherwise.

Also removed some apple-specific workarounds, we will need to look at
that again.
2022-03-30 12:14:13 +02:00
Lion Kortlepel de82caef33 Add HideUpdateMessages setting ("ImScaredOfUpdates") and periodic update reminders (every 5th heartbeat) 2022-03-25 13:34:28 +01:00
Lion Kortlepel f8c58f363a Change default MaxPlayers to 8 2022-03-25 13:32:41 +01:00
Lion Kortlepel 71c2d4b859 Simplify "Backend heartbeat response" error (closes #97) 2022-03-25 12:55:35 +01:00
Lion Kortlepel 7a814ed35e use fmt properly in beammp_*f logging functions 2022-03-24 14:45:53 +01:00
Lion Kortlepel 9e0d02c6db add fmt library, add beammp_*f 2022-03-24 14:36:39 +01:00
Lion Kortlepel dbfe4a4d11 Fix inconsistencies with handling errors in early network startup
In most cases, when socket creation, bind, listen, or similar fails,
it's best to gracefully shutdown. We do that now.
2022-03-24 14:06:03 +01:00
Lion Kortlepel c1e216957b move Json* to Util, add Random, RandomRange, RandomIntRange, catch
errors in TPluginMonitor
2022-03-18 01:52:31 +01:00
Lion Kortlepel be498be661 change TriggerClientEvent to take object, not string, and add TriggerClientEventJson 2022-03-17 18:48:50 +01:00
20dka 3c08e54471 Add basic autocomplete (fix #95) 2022-03-15 01:58:26 +01:00
Lion Kortlepel ca3314b416 add JsonDiffApply, JsonMinify, JsonPrettify, JsonFlatten, JsonUnflatten 2022-03-03 12:25:06 +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 95b417bb36 Add MP.JsonSerialize 2022-03-02 11:43:48 +01:00
Lion Kortlepel 588c68ebe1 Use proper argument parser 2022-02-17 11:08:48 +01:00
Lion Kortlepel 548b2512cc proper command parsing 2022-02-15 16:06:59 +01:00
Lion Kortlepel 8ff94a57d7 Add ParseCommand implementation 2022-02-15 15:34:33 +01:00
Lion Kortlepel 17c571811a Add config option to turn off chat logging
When LogChat is disabled, using the `say` command in the console will
trigger a "chat message sent!" reply, as UX feedback.
2022-02-06 21:46:51 +01:00
Lion Kortlepel fdb7c9ce71 update version to 3.1.0 2022-02-03 19:57:25 +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 81780294f8 advance to 3.0.1 2022-02-03 19:51:59 +01:00
Lion Kortlepel 9f892af997 start fixing backend heartbeat 2022-02-03 19:51:59 +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