Commit Graph

780 Commits

Author SHA1 Message Date
Lion Kortlepel f26ca6b40d add nlohmann/json
this will conflict with a change in the http branch, but i dont care
right now
2022-02-11 10:19:10 +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 144ccf14ec Add AddResultToCheck 2022-02-03 19:52:19 +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 69656f95db Move commandline initialization after cwd setting
This fixes an issue where the log file is written to the original
directory, even if --working-directory=path was used. This can obviously
be pretty bad.
2022-02-03 19:51:59 +01:00
Lion Kortlepel 86b6aed350 UpdateCheck: Try all URLs 2022-02-03 19:51:59 +01:00
Lion Kortlepel 7c1fb12625 add api-v header to heartbeat post 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
Lion Kortlepel 29f8d29e33 Move commandline initialization after cwd setting
This fixes an issue where the log file is written to the original
directory, even if --working-directory=path was used. This can obviously
be pretty bad.
2022-02-03 18:31:18 +01:00
Lion Kortlepel fd12ee672d Add various debug functions 2022-01-26 20:33:12 +01:00
Lion Kortlepel fca5bbcec9 UpdateCheck: Try all URLs 2022-01-21 14:26:42 +01:00
Lion Kortlepel cd4129e05d add api-v header to heartbeat post 2022-01-20 16:09:08 +01:00
Lion Kortlepel c42c748b37 start fixing backend heartbeat 2022-01-20 15:46:13 +01:00
Lion Kortlepel 435d73f0c1 Remove message thing from master, reimplement this later 2021-12-09 12:09:55 +01:00
Lion Kortlepel a5c23f8dde Add ping packet support 2021-12-09 12:08:41 +01:00
Lion 6c5b2cbeb5 Merge branch 'master' into rewrite-lua 2021-12-09 12:04:33 +01:00
Lion Kortlepel ca5b3956a1 Http: Dont generate ssl key/cert with ssl off, reinterpret_cast for
windows
2021-12-08 17:39:13 +01:00
Lion Kortlepel 924e18c163 Remove /status placeholder 2021-12-08 17:39:13 +01:00
Lion Kortlepel a19943c96d Example impl for /status 2021-12-07 15:34:01 +01:00
Lion Kortlepel cd19ae0836 Add shutting down / shutdown states to state keeper 2021-12-07 14:25:04 +01:00
Lion Kortlepel 3ee83904a1 Windows rewrite when
jfc since when is `c_str()` not convertible to `const char*`?
2021-12-06 15:13:55 +01:00
Lion Kortlepel fe652cbf42 Fix server paths 2021-12-06 15:08:01 +01:00
Lion Kortlepel 816d3d5df8 Re-add split history (?) 2021-12-06 14:12:54 +01:00
Lion Kortlepel 817a146699 Add state id to lua prompt 2021-12-06 13:57:40 +01:00
Lion Kortlepel 3cce875fbb Add UseSSL option to server config 2021-12-06 13:47:07 +01:00
Lion Kortlepel a1335e8c7d Add statuses, status messages 2021-12-06 13:17:54 +01:00
Lion Kortlepel 0f74eca2ee Fix various issues and crashes 2021-12-06 12:28:52 +01:00
Lion Kortlepel 279c93179c Fix segfault in http 2021-12-06 10:22:52 +01:00
Lion Kortlepel 62cc1e9ce4 Http: Add config value to turn it off, move all http settings into a category in the config 2021-12-06 09:53:13 +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 b33d50361c fix typo in --help 2021-12-05 01:40:39 +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 86169ad0fa TConsole: Add notice about help command on wrong command 2021-12-05 00:55:42 +01:00
Lion Kortlepel 7b99ccb08e Add --working-directory flag 2021-12-05 00:42:50 +01:00
Lion Kortlepel 265dd710cf add status command 2021-12-02 01:25:17 +01:00
Lion Kortlepel eb67f483b2 Another possible fix for deadlock 2021-11-29 03:07:20 +01:00
Lion Kortlepel 98c7fea139 Possible fix for event handler timeouts 2021-11-29 02:56:41 +01:00
Lion Kortlepel 1bc9a5293e Add kick response 2021-11-29 02:03:20 +01:00
Lion Kortlepel c3151093e2 CMake: remove __linux completely 2021-11-29 01:42:23 +01:00
Lion Kortlepel 8f77f1c8c0 Add kick, fix cmakelists pretending to be on linux all the time
lol
2021-11-29 01:34:35 +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
Lion Kortlepel c91f3ee33c Print entering and leaving lua as raw 2021-11-29 00:17:09 +01:00
Lion Kortlepel 768d0466f4 Add simple command interface 2021-11-28 23:45:03 +01:00
Lion Kortlepel a4123d7d7c Remove --ip example 2021-11-27 03:28:35 +01:00
Lion Kortlepel 6fd54f7907 Fix server message printing bug
There was a space missing
2021-11-27 02:31:21 +01:00
Lion Kortlepel fd7bea0f36 Add BEAMMP_{WINDOWS,LINUX,APPLE} preprocessor defines instead of platform specific ones 2021-11-27 02:11:22 +01:00
Lion Kortlepel 9d2d4bb221 Remove --ip
This should be re-added later as a ServerConfig value
2021-11-26 19:08:05 +01:00