Commit Graph

1028 Commits

Author SHA1 Message Date
Lion Kortlepel d8b8812026 remove password setting from config to avoid confusion
...until implemented
2023-12-05 18:23:23 +01:00
Lion Kortlepel f98704e0f3 fix warnings about implicit conversion 2023-12-05 18:05:35 +01:00
Lion Kortlepel 11fe5ad200 fix invalid timeout value 2023-12-05 18:00:34 +01:00
Lion Kortlepel 667da22b0e Merge remote-tracking branch 'origin/master' into new-buildsystem 2023-12-05 17:59:05 +01:00
Lion Kortlepel a6eb2f7bfe switch to vcpkg+cmake, add debian build to workflows
using lionkor's template (MIT licensed)

This is a combination of 64 commits.
2023-12-05 17:57:19 +01:00
Lion Kortlepel 22805af716 fix crash in authentication 2023-12-03 17:43:41 +01:00
rgnter 222d2492ff Merge branch 'master' into optimize/add_cv_to_luaresult 2023-03-21 20:17:17 +01:00
Simon 879b9772f5 Apply suggestions from code review
Co-authored-by: Lion <development@kortlepel.com>
2023-01-15 17:12:35 +00:00
Anonymous275 d677d8d58d rename Hash function to HashPassword
move HashPassword to cpp only
move check to line 285
2023-01-15 17:12:35 +00:00
Anonymous275 4b30918659 - add 120 seconds timeout 2023-01-15 17:12:35 +00:00
Anonymous275 688e46f524 - fix linux build 2023-01-15 17:12:35 +00:00
Anonymous275 9f59c27b1f - add hash function
- add password config
- add debug messages for password stages
- add pass boolean for heartbeat
- adjust network codes
2023-01-15 17:12:35 +00:00
rgnter b7b578bf3e add conditional variable to LuaResult 2022-12-18 14:45:33 +01:00
Lion Kortlepel b10d5d0f4e fix empty events causing issues in the server
an empty event packet, if sent just right, could crash the server
2022-10-31 11:31:15 +01:00
Lion Kortlepel 5581fd1692 fix chat message impersonation issue
instead of using the supplied name, we ignore it entirely and use the
server's internal name for the client
2022-10-31 11:31:15 +01:00
Lion Kortlepel d36bb7962c ignore empty chat messages
this could happen with a malicious client of some kind, we should simply
ignore them
2022-10-31 11:31:15 +01:00
Lion Kortlepel 4e8bd993d5 remove J packet handler
it wasn't used by anything in the launcher, mod, or during the join
sequence, so i removed it for now.
2022-10-31 11:31:15 +01:00
Lion Kortlepel abff9bfbdb fix crash when chat message is malformed 2022-10-31 11:31:15 +01:00
Lion Kortlepel b024533f90 fix crash when the header of a TCP packet is negative 2022-10-31 11:31:15 +01:00
Lion Kortlepel f9251ff92c add more warning prints on unexpected cases 2022-10-31 11:31:15 +01:00
Lion Kortlepel 99f41c28cb fix #135 by making onPlayerDisconnect blocking, and calling it before removing the player
before, the handlers were not waited for, so the client was usually
destructed before lua got to the actual event handler call. Now, the
handler is called and waited on, and once all handlers are done, the
client is properly removed from the players internally, thus making
calls to GetPlayerName, GetPlayerIdentifiers, etc. return nil etc.
2022-10-31 11:31:15 +01:00
Lion Kortlepel bbd27c9cba fix formatting bug in status (closes #143) 2022-10-31 11:31:15 +01:00
Lion Kortlepel 2b61f11a86 fix EnsureArgsCount not properly printing min/max 2022-10-31 11:24:13 +01:00
Lion Kortlepel 917c501faf fix typo causing beammp forum id not to show in identifiers (fix #137) 2022-10-22 21:16:31 +02:00
Lion Kortlepel bdf2da758c remove pps from heartbeat
"PPS has no meaning anymore and is completely irrelevant. You should
ignore it, it is not an indicator of ANYTHING. If it’s high, that means
NOTHING. If it’s low, that means NOTHING. If it’s -, that means
NOTHING."

It's packets per second per player per vehicle, but is only sent every
30 seconds, its not averaged, and on the client-side, it shows a ping
icon next to it.

A client can open a new connection to the server and send a `P`, and
measure the time to the `P` response packet. The connection is then
closed. This was added ages ago, please use this instead for ping :)
2022-10-17 14:05:51 +02:00
Lion Kortlepel 92632b53b5 fix binary data breaking in UDPRcvFromClient 2022-10-15 23:30:09 +02:00
Lion Kortlepel 87965433c2 change log levels of common warnings and errors to debug
this hides a lot of the "standard" errors we get behind the debug flag.
for example, disconnecting a disconnected player would be such an error
2022-10-15 23:16:16 +02:00
Lion Kortlepel 75ff9f7571 remove "backend response failed to parse as valid json" 2022-10-15 23:16:16 +02:00
Lion Kortlepel 94c0547a35 fix crash when the client disconnects while sending first identify setting 2022-10-15 23:16:16 +02:00
Lion Kortlepel 54730d2baf remove heartbeat spam logging 2022-10-15 23:16:16 +02:00
Lion Kortlepel 064e71e59f fix client version check 2022-10-15 23:16:16 +02:00
Lion Kortlepel 4320a91e5c use message() instead of what() for ec 2022-10-15 23:16:16 +02:00
Lion Kortlepel 7d1318653c fix boost::system::error_code 2022-10-15 23:16:16 +02:00
Lion Kortlepel 67d02d4cf2 remove unused error check 2022-10-15 23:16:16 +02:00
Lion Kortlepel cc6b7846b2 add system include 2022-10-06 00:51:51 +02:00
Lion Kortlepel 88f5db514f remove unused headers 2022-10-06 00:46:35 +02:00
Lion Kortlepel e595192829 rename header to boost errc 2022-10-06 00:43:17 +02:00
Lion Kortlepel 917e3f98ab fix github actions dependencies for linux to use proper boost version 2022-10-06 00:36:57 +02:00
Lion Kortlepel c42a523532 remove SO_SNDTIMEO for now 2022-10-06 00:24:13 +02:00
Lion Kortlepel 95ae0f5d03 fix 'Od' and 'Or' packets not being broadcast 2022-10-05 22:17:56 +02:00
Lion Kortlepel fc0a509bd9 fix clientversion parameter in heartbeat 2022-10-05 21:15:11 +02:00
Lion Kortlepel 231b13a0e7 fix a ghost client bug 2022-10-05 18:17:18 +02:00
Lion Kortlepel 7d2e4d4581 replace tcp networking with boost::asio tcp networking 2022-10-05 18:17:04 +02:00
Lion Kortlepel 7446526a19 fix binding of udp server socket
it was not binding properly because it wasn't open()ed, i guess
2022-10-05 13:06:36 +02:00
Lion Kortlepel 6e97a3cd6e switch udp networking to boost implementation 2022-10-05 12:14:25 +02:00
Lion Kortlepel 5f1d003077 fix various potential crashes in TServer::HandlePosition 2022-10-03 17:06:32 +02:00
Lion Kortlepel 5d3dff3c88 add identifiers (beammp id, ip) as an argument to onPlayerAuth 2022-10-03 15:31:32 +02:00
Lion Kortlepel cb0cb30797 fix windows compiler not understanding a CLEAR AND SIMPLE FUNCTION-STYLE
CONSTRUCTOR CALL

AHHHHHHH
2022-10-03 15:12:59 +02:00
Lion Kortlepel 1f14de2e71 revert 9c6127a105 and apply proper fix 2022-10-03 15:11:26 +02:00
Lion Kortlepel 658b37acac fix error sometimes not displaying when failing inside global event handler 2022-10-03 14:38:19 +02:00