Dennis Felsing
cb2fa0800f
Merge pull request #2934 from def-/pr-show_ips2
...
Fix show_ips on non-SQL servers
2020-09-27 10:38:37 +02:00
Zwelf
cb2c1d2144
Fix cutting of one character when showing ips in rcon
...
The buffer size passed to `str_append` includes the null terminator.
2020-09-27 10:15:41 +02:00
def
b0b47e1286
Fix show_ips on non-SQL servers
...
Mistake was introduced in 7c31a15c93
We didn't notice since official servers are SQL, except Block servers,
and we just started moderating them a bit.
2020-09-27 01:16:18 +02:00
def
3be8a592e5
Run clang-format
...
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:
$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
def
6ce04d93f1
Server: Only recv new packets when we know they are waiting
...
Reduces the number of syscalls
2020-09-15 19:11:51 +02:00
def
28cd437684
Document which commands only work in initial config ( fixes #2773 )
2020-09-07 12:31:00 +02:00
bors[bot]
e3b879f616
Merge #2736
...
2736: Let 0.7 clients fastdownload too r=def- a=Learath2
Easier than expected, I wonder why I didn't do this at the start.
Co-authored-by: Learath <learath2@gmail.com>
2020-09-04 14:17:32 +00:00
Learath
b8242689c6
Let 0.7 clients fastdownload too
2020-09-04 16:45:49 +03:00
heinrich5991
31cfa9250d
Fix server port in teehistorian
...
Official servers weren't affected because they didn't use the default of
`sv_port 0`.
2020-08-29 14:14:37 +02:00
Andrii
cec8bf2195
Read server port from CNetServer but not from app config
2020-08-27 19:54:44 +03:00
def
d41a6e6878
Give a more instructive message on DNSBL ban
2020-08-25 13:41:38 +02:00
Learath
97b6704a6b
Add ban_region_range and sv_region_name
2020-08-19 14:07:55 +03:00
Learath
6a936602aa
Add ban_region
2020-08-19 12:38:49 +03:00
Zwelf
b2cf3cafc5
Implement dump_sqlserver
2020-08-03 16:37:50 +02:00
Zwelf
7c31a15c93
Add SQLite interface
2020-08-03 12:58:52 +02:00
Zwelf
2eb3d23ef4
Rewrite score using the new interface
...
delete file_score for now as it will be replaced by a sqlite backend
2020-08-03 12:58:52 +02:00
def
c8876b2c02
Fix legacy 64 player serverinfo, don't send duplicate packets ( fixes #2495 )
...
For legacy we sent the first packet once correctly, then the 2nd and 3rd
packet without the marker and token at the start, so they never worked.
For new 64 player serverinfo we sent all packets correctly but the 1st
packet twice.
Introduced in #1955 .
2020-07-13 00:19:00 +02:00
def
a34c72530b
Some minor improvements to sv_port 0, make it default
2020-07-09 18:28:20 +02:00
MikiGamer
f7eda384ea
changes for auto port
2020-07-09 17:48:03 +02:00
MikiGamer
beaadca6a9
switch, limited tries & sv_port 0
2020-07-09 17:47:30 +02:00
MikiGamer
6a87278c3d
find available port
2020-07-09 17:46:22 +02:00
def
f15ac1d869
Fix uninitialised values in sixup differently ( fixes #2421 )
...
"./DDNet-Server shutdown" still works
2020-07-07 10:26:44 +02:00
Learath
416cb37000
Send Sixup information to antibot
2020-07-01 21:09:58 +03:00
heinrich5991
358735aadb
Revert "Don't run UpdateServerInfo if server isn't initialized yet"
...
This reverts commit e69f747e5f
.
Fixes `shutdown` on the initial command line which is also used on CI.
2020-07-01 17:45:01 +02:00
def
e69f747e5f
Don't run UpdateServerInfo if server isn't initialized yet
...
or currently shutting down anyway. Fixes the first half of #2421
2020-06-30 18:33:22 +02:00
Learath
8d8f1d7208
Only SendChat to clients that exist. Initialize m_Sixup anyway
2020-06-30 18:58:44 +03:00
bors[bot]
1750bb09f7
Merge #2335 #2336 #2340 #2342 #2349
...
2335: Make it more clear that this is a sixup translation server r=heinrich5991 a=def-
2336: Set skill level for Sixup (fixes #2334 ) r=heinrich5991 a=def-
2340: Keeping multiple states consistent is hard (fixes #2315 ) r=heinrich5991 a=def-
let's go recount every time
2342: Don't forget video recorder fps setting r=heinrich5991 a=def-
after switching to non-videorecorder client
2349: Document which MySQL/MariaDB versions we require (fixes #2343 ) r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
2020-06-24 14:37:53 +00:00
def
5b3b42b771
Make it more clear that this is a sixup translation server
2020-06-24 14:49:23 +02:00
def
a8a2b41f3a
Set skill level for Sixup ( fixes #2334 )
2020-06-23 22:47:29 +02:00
Learath
f327e5bc42
Log join type
2020-06-23 18:30:57 +03:00
Learath
28905c4659
Disable timeout for 0.7 clients
2020-06-20 19:52:23 +03:00
Learath
6db72b2388
Times are no longer negative in 0.7
2020-06-20 11:59:46 +03:00
Learath
91c44f1808
Sixup needs it's own maps
2020-06-20 01:00:45 +03:00
bors[bot]
5b4227fbba
Merge #2283
...
2283: teehistorian: Track whether clients join via the 0.7 protocol r=Learath2 a=heinrich5991
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-19 20:31:40 +00:00
heinrich5991
e294da41ba
teehistorian: Track whether clients join via the 0.7 protocol
2020-06-19 22:06:39 +02:00
Learath
da68923ac3
Implement a switch for 0.7 compatibility
2020-06-19 22:08:41 +03:00
Learath
aeb7ea2971
Don't forget that the client is Sixup
2020-06-19 20:28:55 +03:00
Learath
70ecf785bb
Compatible version filter
2020-06-19 20:28:55 +03:00
Learath
9f71478099
Get Rcon working
2020-06-19 20:28:55 +03:00
Learath
88ca573682
Serverinfo and Register support for 0.7
...
Co-authored-by: Tim Schumacher <tim@timakro.de>
2020-06-19 20:28:55 +03:00
Learath
9e2434c65d
Better skin colors. Better game message translation
2020-06-19 20:28:55 +03:00
Learath
9dc1a0357a
Get /spec working
2020-06-19 20:28:55 +03:00
Learath
03070d0567
Fix many issues
2020-06-19 20:28:52 +03:00
Learath
807c92f1a4
Generate the 0.7 protocol
2020-06-19 20:27:15 +03:00
Learath
f7e9df7abf
Move the rest of the translation to CServer
2020-06-19 20:27:15 +03:00
Learath
b0e5a37fa9
Do message translation differently
2020-06-19 20:27:15 +03:00
Learath
5000b248bb
Fix things
2020-06-19 20:27:15 +03:00
Tim Schumacher
442148a194
Begin work on 0.7 support
2020-06-19 20:27:15 +03:00
Zwelf
f5ac6eea56
Fix segmentation fault when creating sql tables failed
...
`GameServer()->OnShutdown(true);` (which would wait on running threads to exit)
wasn't called if an error occured in the server init. Therefore `CServer` was
freed before the init-thread finished executing, causing a use after free from
`CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`.
2020-06-18 21:11:36 +02:00
Zwelf
62d56ca8e8
Make database init with create tables synchronous
...
Note: database init without creating tables behaves the same
2020-06-15 11:14:15 +02:00
bors[bot]
92fc95d742
Merge #2202
...
2202: Send DDNet version early in the connection process r=Learath2 a=heinrich5991
This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-27 17:49:31 +00:00
heinrich5991
f339fea748
Merge pull request #2139 from edg-l/pr_add_upnp
...
Add UPnP support
2020-05-24 22:23:20 +02:00
Edgar
3569e174f2
refactor upnp code
2020-05-24 11:36:43 +02:00
heinrich5991
0d7872c79e
Send DDNet version early in the connection process
...
This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.
2020-05-22 17:58:41 +02:00
Learath
850e4e84e4
Reserve bytes for the type and token
2020-05-18 21:13:15 +03:00
heinrich5991
457c4db964
Some antibot fixes
2020-05-16 00:39:17 +02:00
Learath
5e02bb5a23
Extend antibot interface
...
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-13 23:39:40 +03:00
Ryozuki
b647c1e978
Add UPnP support
2020-04-14 12:11:50 +02:00
bors[bot]
7a3ebd5948
Merge #2041
...
2041: Strip spaces in browser (server name) r=heinrich5991 a=ChillerDragon
before:
![image](https://user-images.githubusercontent.com/20344300/72688976-b45f1d00-3b0c-11ea-8920-5328c6d721f7.png )
after:
![image](https://user-images.githubusercontent.com/20344300/72688970-9db8c600-3b0c-11ea-8636-330218d75ca1.png )
Co-authored-by: KillaBilla <robomastermail@googlemail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-01-25 12:45:36 +00:00
bors[bot]
749929431a
Merge #2040
...
2040: fixed faulty message id r=heinrich5991 a=ChillerDragon
(cherry picked from commit 9023796d27
)
Co-authored-by: oy <Tom_Adams@web.de>
2020-01-25 12:40:14 +00:00
12pm
ec42291756
Allow filtering by name in status
...
Easier to find players when the server is full
2020-01-24 14:44:54 +01:00
KillaBilla
ba1abac52f
remove leading and trailing space from server name and forbit the use of multiple spaces
...
(cherry picked from commit a9cc1e8de2
)
2020-01-19 22:28:19 +01:00
oy
1b4131a7fd
fixed faulty message id
...
(cherry picked from commit 9023796d27
)
2020-01-19 21:30:12 +01:00
Learath
d2fad6c79a
Fix demo bug
2020-01-03 12:13:40 +03:00
ChillerDragon
4a6a85124a
Remove some unused includes
2019-12-14 10:20:42 +01:00
Dennis Felsing
785ec3d345
Expire server info on connected/drop events
2019-11-04 15:45:55 +01:00
Learath2
c2bcd3bd4d
Fix bug
2019-11-04 01:06:52 +01:00
bors[bot]
0de012572b
Merge #1955
...
1955: Cache serverinfo responses r=def- a=Learath2
I'm not sure I like it but it works
Co-authored-by: Learath2 <learath2@gmail.com>
2019-11-03 20:09:21 +00:00
def
fdaafea6b5
Also init m_aClients[*].m_Latency
...
as reported by valgrind --tool=memcheck:
==376722== Conditional jump or move depends on uninitialised value(s)
==376722== at 0x1CDBDB: int maximum<int>(int, int) (math.h:79)
==376722== by 0x216A46: CPlayer::Tick() (player.cpp:174)
==376722== by 0x1FB308: CGameContext::OnTick() (gamecontext.cpp:658)
==376722== by 0x1C60AF: CServer::Run() (server.cpp:2046)
==376722== by 0x1CB099: main (server.cpp:3040)
==376722==
==376722== Conditional jump or move depends on uninitialised value(s)
==376722== at 0x183F27: int minimum<int>(int, int) (math.h:77)
==376722== by 0x216A65: CPlayer::Tick() (player.cpp:175)
==376722== by 0x1FB308: CGameContext::OnTick() (gamecontext.cpp:658)
==376722== by 0x1C60AF: CServer::Run() (server.cpp:2046)
==376722== by 0x1CB099: main (server.cpp:3040)
2019-11-03 18:54:25 +01:00
Learath2
c4d18118c1
Use automatic storage for the data
2019-11-03 18:31:05 +01:00
Learath2
52cca29cd9
Use a std::list, improve variable naming
2019-11-03 15:39:32 +01:00
Learath2
3d495a9936
Initialize variables
2019-11-03 01:53:50 +01:00
Learath2
79e4651d5b
Only update serverinfo when needed
2019-11-03 01:07:10 +01:00
Learath2
7f0589bff7
Cache serverinfo responses
2019-11-03 00:33:30 +01:00
def
cb738ffed0
Fix show_ips to show regular formatting ( fixes #1873 )
2019-08-01 20:24:30 +02:00
Learath
0bc3650356
Send DDNet capability flag
2019-07-29 14:18:40 +03:00
12pm
c57fcf3ee7
Persist playerflags when using timeout protection
2019-07-26 01:39:53 +02:00
Emir Marincic
57197d990c
Better represent the state of the server
...
Co-Authored-By: heinrich5991 <heinrich5991@gmx.de>
2019-07-20 21:25:15 +03:00
Learath
1769e5ae71
Don't advertise the reserved slots. Fix #1808
2019-07-18 18:20:55 +03:00
bors[bot]
bbcf7a6905
Merge #1815
...
1815: Return error codes on server fail r=def- a=ChillerDragon
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2019-07-11 09:25:59 +00:00
ChillerDragon
b9273a9ed2
Return error codes on server fail
2019-07-11 11:18:25 +02:00
ChillerDragon
6172a9dca0
Use the float type explicitly
2019-07-08 23:08:42 +02:00
heinrich5991
62846821da
Revert "Implement ISDDNET. Deprecates #1320 "
...
This reverts commit 1929bc6739
.
2019-06-14 00:28:59 +02:00
heinrich5991
f31e081bd4
Remove all checking for the gametype in the game
...
OK, maybe not actually remove because it is kept for fallback when the
new method isn't available.
The whole gametype parsing business had the same downsides as user agent
parsing on the web, hence I removed it while keeping behavior the same.
This allows servers to explicitly opt in or out of certain bug
workarounds and other client behavior. This increases the complexity of
different configurations that are available in the client (which is a
bad thing).
2019-06-14 00:28:59 +02:00
def
85bb376bdc
sv_server_info_per_second, sv_van_conn_per_second: allow 0 to disable
...
Clean up code a bit, also allow larger values
2019-06-11 18:12:43 +02:00
Learath
1929bc6739
Implement ISDDNET. Deprecates #1320
2019-05-21 10:25:15 +02:00
bors[bot]
9bca330a73
Merge #1691
...
1691: Persist show_ips setting on map changes r=Learath2 a=def-
@12pm
Co-authored-by: def <dennis@felsin9.de>
2019-05-01 12:08:13 +00:00
ChillerDragon
7a7caabbec
Fix inconsistant uppercase server in logs
2019-04-30 09:03:06 +02:00
def
a910d9eff7
Persist show_ips setting on map changes
2019-04-29 21:39:17 +02:00
Dennis Felsing
cde07b420b
Implement changes suggested by -Wuseless-cast
...
But don't enable it yet because I'm not sure what the best way is.
2019-04-11 19:54:43 +02:00
def
25c54ef4db
Implement show_ips to protect accidental leaking of IPs
...
Marks all sensitive data with <{ }> and then filters that out when
show_ips is not set.
2019-04-06 19:22:02 +02:00
heinrich5991
e44b1ca986
Use OpenSSL md5 if it is available
...
Fixes #1582 .
2019-04-06 02:56:29 +02:00
12pm
a7ef921e3f
Add playerflags, dnsbl, and ips for non-admins in status
2019-04-03 15:07:05 +02:00
Dennis Felsing
8b68a2859a
Merge pull request #1509 from ddnet/error-checking
...
More error checking in system.c (fixes #1317 )
2019-03-20 07:44:12 +01:00
def
1e4890c499
More error checking in system.c ( fixes #1317 )
2019-03-19 23:16:29 +01:00
12pm
9f4f06e995
Make updating nameban reason work
2019-03-19 22:54:16 +01:00
Dennis Felsing
b8c256b602
Merge pull request #1467 from 12pm/nameban_exact
...
Add exact name ban option
2019-03-11 22:50:39 +01:00
12pm
3dcb83778f
Make name more descriptive
2019-03-11 14:48:45 +01:00
bors[bot]
26dc51a272
Merge #1466
...
1466: Add colors for authed players. Deprecates #1299 r=def- a=Learath2
Not sure if a snap item is the best idea for this but it should help with not sending the data more then needed and keeping it properly updated. The colors aren't great now but we can fix that easily.
![image](https://user-images.githubusercontent.com/490500/53680889-607bf780-3cf2-11e9-84a0-579160e9e170.png )
Co-authored-by: Learath <learath2@gmail.com>
2019-03-06 13:44:28 +00:00
def
deb2494692
Don't suggest to downgrade, clean up versioning ( fixes #1440 )
2019-03-03 20:31:23 +01:00