Commit graph

230 commits

Author SHA1 Message Date
def 36d5c8d608 string toggling supports escaped strings; also some code cleanup 2017-07-08 11:03:51 +02:00
def 7a83af4d1b Fix Mac build 2017-06-02 22:10:58 +02:00
def fe89b65368 Stupid C90 2017-06-02 20:31:37 +02:00
def a6e144ea72 Let's not crash the client and server on dbg_assert 2017-06-02 20:12:20 +02:00
def 9b48e902f0 Prevent data race when initializing loggers 2017-06-02 18:47:26 +02:00
heinrich5991 5ae37e6c72 Add protocol extension with UUIDs
This system can easily be extended by independent authors without
collisions, something the old system with plain increasing integers did
not allow.

Do this by utilizing the previously unused message code `NETMSG_NULL`
which has a value of 0.

This works for engine and game messages, snapshot items and events.
2017-05-25 00:52:43 +02:00
Dennis Felsing 63ca2f8749 Show nr of skipped log messages 2017-04-21 10:50:16 +02:00
def d84911618a Don't block when logging queue is full, instead ignore message 2017-04-20 21:25:20 +02:00
heinrich5991 1d81d56850 Introduce new, vanilla-compatible server info protocol
This means that we have a reliable and fast way to query for extended info,
while also not wasting network bandwidth.

The protocol is designed to be extensible, there's four bytes space for
encoding more request types (currently zeroed), and there's one string in each
response packet and one string for each player available (currently the empty
string).

The protocol itself has no problems with more than 64 players, although the
current client implementation will drop the player info after the 64th player,
because it uses a static array for storage.

Also fixes #130, the player list is just sorted each time new player info
arrives.
2017-03-29 12:56:13 +02:00
heinrich5991 f7dde1e061 Partially revert #681
The refactoring can cause a gameplay change, laws of associativity like
`x * (1 / z) == (x * 1) / z` don't hold for floating point numbers.
2017-03-16 10:19:08 +01:00
Ryozuki d0c317d7c7 Fix a typo and refactor the normalize function 2017-03-16 07:55:49 +01:00
heinrich5991 d98abf35db Rename WEBSOCKETS to CONF_WEBSOCKETS 2017-03-07 13:03:37 +01:00
heinrich5991 c201d7959c Enable -Wdeclaration-after-statement for compat with MSVC 2017-03-07 13:02:37 +01:00
heinrich5991 6302e4d7e0 Fix some style issues and a > to >= 2017-03-06 20:11:23 +01:00
Learath2 8c79f28802 Fix a crash on malformed input 2017-03-06 15:18:52 +01:00
Learath2 3c6a21ace2 dbg_assert felt more appropriate 2017-03-06 12:58:49 +01:00
Learath2 939a7f0d3f This time actually add error checking to str_hex_decode 2017-03-06 12:33:29 +01:00
Learath2 ed5824589c Make str_hex_decode a little more friendly 2017-03-04 23:06:07 +03:00
Learath2 b7cbaedea0 New auth system for rcon 2017-03-02 18:16:29 +03:00
def 49127a251a Initialize int to fix compiler warning 2016-11-19 01:42:20 +01:00
heinrich5991 ba8f2feb8b Improve performance of str_utf8_skeleton
Break out of the loop early if possible.
2016-11-07 21:42:19 +01:00
heinrich5991 cd3b0ae855 Implement the confusable algorithm from Unicode more closely
See UTS#39 "Unicode Security Mechanisms":
http://www.unicode.org/reports/tr39/

This means that characters with accents or other things around them are
now considered the confusable with the base character.

Fixes #557. Fixes #575.
2016-10-30 13:45:55 +01:00
east 3b8c17d9d6 fixed VS compilation 2016-10-06 13:03:48 +02:00
heinrich5991 89b6d0c3da Fix C89 compilation and a copy&paste mistake 2016-10-03 12:31:11 +02:00
heinrich5991 e950351346 Put the password generation into base 2016-10-01 23:04:16 +02:00
def 28f50e4440 Revert "Implement comma in search and exclude queries to separate search terms"
This reverts commit 3341e18d13.
2016-08-07 00:52:00 +02:00
def 5b19be992d C89 fix 2016-08-03 00:24:58 +02:00
def 3341e18d13 Implement comma in search and exclude queries to separate search terms 2016-08-02 22:16:02 +02:00
H-M-H a4a841c0f9 fix timer on macOS 2016-07-10 16:07:21 +02:00
heinrich5991 d8e27027f8 Use the monotonic clock on OS X 2016-07-03 12:56:29 +02:00
def 071822d281 Use clock_gettime(CLOCK_MONOTONIC) instead of gettimeofday().
Seems to work fine. (The initial bugs I had with this were caused by my
system's clock being wrong)
2016-06-28 23:30:35 +02:00
H-M-H c9e65c7931 Merge branch 'master' into sqlmasters 2016-05-03 23:07:24 +02:00
def 61e47422f6 Clean up debug messages a bit (lower case, no useless errors) 2016-05-02 21:35:32 +02:00
def c683703df0 Fix system.c for C89 2016-05-01 19:35:21 +02:00
def ab13a0086d Updater: Support downloading files into new directories 2016-05-01 14:20:55 +02:00
H-M-H 88ed7391da handle exceptions from sql properly
- write failed sqlinserts to a file
- improved structure
2016-02-20 15:33:35 +01:00
heinrich5991 a1923b154b Only ignore messages on invalid UTF-8, don't kick players 2016-01-27 01:48:19 +01:00
east 5267dfa9ac secure_rand: range [0, RAND_MAX] 2016-01-02 15:51:21 +01:00
east f3f33904f7 secure_rand() as replacement for client source port generation 2016-01-02 15:37:44 +01:00
fisted 522c41330d support NetBSD 2015-09-23 16:47:20 +02:00
heinrich5991 41a9760d79 Fix a constant in the UTF-8 decoder
(I can't read. Constant is described in
https://encoding.spec.whatwg.org/#utf-8-decoder step 3 second case.)
2015-09-08 11:44:57 +01:00
def 96f2a380f6 Get rid of warning 2015-09-05 04:52:18 +02:00
def 7487923774 Fix Windows thread handle leak 2015-09-05 04:49:22 +02:00
east 675c6eb1e0 Demo browser column listbox added 2015-08-27 15:05:24 +02:00
def a4a48255bc Minor indentation fix 2015-08-26 15:44:25 +02:00
def 6c0bac7508 Remove useless comparison 2015-08-26 04:02:52 +02:00
def 982737909f Merge branch 'master' of github.com:ddnet/ddnet
Fixes #249
2015-08-22 21:53:10 +02:00
oy 893964848e fixed wrong types within vector constructors. Closes #1371 2015-08-22 21:49:11 +02:00
Chairn 33c421b428 Made fs_getmtime works for window. 2015-08-22 21:29:34 +02:00
def c033ad6828 Fix compilation on windows, needs implementation of fs_getmtime on Windows 2015-08-22 20:32:02 +02:00