Jonathan G Rennison
61cc60099a
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/network/core/packet.cpp
# src/network/core/udp.cpp
3 years ago
Jonathan G Rennison
4a57625183
Avoid cast warnings in network packet handling
...
See: #307
3 years ago
Jonathan G Rennison
0842621653
Remove unused _network_udp_mutex
...
See: #307
3 years ago
Jonathan G Rennison
24c6dfe872
Merge branch 'master' into jgrpp-beta
3 years ago
Jonathan G Rennison
da282c3ecc
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# CMakeLists.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/korean.txt
# src/lang/norwegian_bokmal.txt
# src/lang/russian.txt
# src/lang/spanish.txt
# src/misc_gui.cpp
# src/newgrf.cpp
3 years ago
Jonathan G Rennison
81290df946
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/lang/spanish.txt
# src/network/core/tcp_content_type.h
# src/network/network_content.cpp
# src/saveload/cheat_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/settings.cpp
# src/settings_internal.h
# src/table/settings.h.preamble
# src/table/settings/company_settings.ini
# src/table/settings/currency_settings.ini
# src/table/settings/gameopt_settings.ini
# src/table/settings/misc_settings.ini
# src/table/settings/settings.ini
# src/table/settings/win32_settings.ini
# src/table/settings/window_settings.ini
3 years ago
glx22
1c0700e0c0
Fix #9624 : compilation with RANDOM_DEBUG
3 years ago
Jonathan G Rennison
a9c2c7288a
Fix compilation when ENABLE_NETWORK_SYNC_EVERY_FRAME is defined
...
This is set by RANDOM_DEBUG
See also: https://github.com/OpenTTD/OpenTTD/issues/9624
3 years ago
Jonathan G Rennison
544da99102
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/cargopacket.h
# src/lang/korean.txt
# src/linkgraph/linkgraph.h
# src/linkgraph/linkgraphjob.h
# src/linkgraph/linkgraphschedule.h
# src/network/network_admin.h
# src/network/network_func.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/order_base.h
# src/rail_cmd.cpp
# src/saveload/company_sl.cpp
# src/saveload/depot_sl.cpp
# src/saveload/economy_sl.cpp
# src/saveload/linkgraph_sl.cpp
# src/saveload/map_sl.cpp
# src/saveload/newgrf_sl.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/signs_sl.cpp
# src/saveload/station_sl.cpp
# src/saveload/subsidy_sl.cpp
# src/saveload/town_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/script/api/script_object.cpp
# src/settings.cpp
# src/string.cpp
# src/string_func.h
# src/table/CMakeLists.txt
# src/table/settings/settings.ini
# src/viewport_sprite_sorter_sse4.cpp
3 years ago
Jonathan G Rennison
406b81abb1
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/economy.cpp
# src/lang/traditional_chinese.txt
# src/order_gui.cpp
# src/settings.cpp
# src/settings_internal.h
# src/table/company_settings.ini
# src/table/currency_settings.ini
# src/table/gameopt_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/table/win32_settings.ini
# src/table/window_settings.ini
3 years ago
Jonathan G Rennison
784fcbd1e7
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/table/currency_settings.ini
# src/table/gameopt_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
3 years ago
Charles Pigott
3b7daca832
Change: Don't use 'server address' string in server list when displaying an invite code ( #9615 )
3 years ago
Jonathan G Rennison
4042480806
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/table/company_settings.ini
# src/table/currency_settings.ini
# src/table/gameopt_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/table/win32_settings.ini
# src/table/window_settings.ini
3 years ago
TELK
3e78624965
Fix #9362 : Hover in online players window was slightly too big ( #9364 )
...
This causes graphical glitches at the bottom of the window.
(cherry picked from commit 2d0abf5a76
)
3 years ago
Patric Stout
e4ad632989
Add: [Network] Keep the refresh button in lowered state while refreshing ( #9600 )
...
This gives user visual feedback that the refresh is still pending, and
prevents people from clicking again and again thinking nothing is
happening. This is especially true for connections that fall back to
TURN, as that takes a few seconds to kick in.
Additionally, prevent clicking on the button again while a refresh
is pending. This is only delaying a successful result.
3 years ago
Jonathan G Rennison
fd605e3cf3
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/commit-checker.yml
# src/company_cmd.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/indonesian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/swedish.txt
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/mcf.cpp
# src/network/core/tcp.cpp
# src/network/core/tcp.h
# src/network/core/tcp_game.h
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_admin.cpp
# src/network/network_admin.h
# src/network/network_chat_gui.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf.cpp
# src/newgrf_station.cpp
# src/order_gui.cpp
# src/rail_cmd.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/station_cmd.cpp
# src/stdafx.h
# src/table/currency_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/terraform_cmd.cpp
# src/timetable_gui.cpp
# src/train_cmd.cpp
# src/tree_cmd.cpp
# src/water_cmd.cpp
3 years ago
Jonathan G Rennison
0b0d154788
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# src/lang/german.txt
# src/lang/romanian.txt
# src/lang/slovak.txt
# src/lang/turkish.txt
# src/network/core/address.cpp
# src/network/core/tcp.h
# src/network/core/udp.cpp
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/network/network_udp.cpp
# src/openttd.cpp
# src/saveload/newgrf_sl.cpp
# src/tree_cmd.cpp
# src/video/video_driver.hpp
# src/window.cpp
# src/window_gui.h
3 years ago
dP
31cf9e888b
Add: [Network] external chat messages for remote admins ( #9563 )
3 years ago
Patric Stout
d9f8ed7bdf
Add: [Network] On join, log the ClientID + IP + Name clearly ( #9558 )
...
Additionally, reword the disconnect to match connect / join messages.
Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
3 years ago
Jonathan G Rennison
da1ac73c02
Merge commit 'f1dfa661a1898cde06a38ab4cb230c95912b245b' into jgrpp-beta
...
# Conflicts:
# src/lang/estonian.txt
# src/lang/hungarian.txt
# src/network/core/game_info.cpp
# src/network/core/game_info.h
# src/network/core/packet.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/openttd.cpp
# src/string_func.h
3 years ago
Jonathan G Rennison
2bd535e834
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/engine_base.h
# src/gfxinit.cpp
# src/graph_gui.cpp
# src/lang/brazilian_portuguese.txt
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/korean.txt
# src/lang/norwegian_bokmal.txt
# src/lang/portuguese.txt
# src/lang/russian.txt
# src/lang/spanish.txt
# src/lang/spanish_MX.txt
# src/network/core/address.cpp
# src/network/core/game_info.h
# src/network/core/os_abstraction.h
# src/network/core/udp.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_internal.h
# src/newgrf_engine.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/string_func.h
# src/town_gui.cpp
# src/video/video_driver.cpp
# src/widget_type.h
3 years ago
Jonathan G Rennison
7e39d3f24a
Support sending extended game info in response to PACKET_CLIENT_GAME_INFO
3 years ago
Jonathan G Rennison
8a0821c96e
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/network/core/game_info.h
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_internal.h
# src/network/network_udp.cpp
3 years ago
Patric Stout
a8641ea44a
Add: support filtering content entries for patchpacks ( #9541 )
...
This changes nothing for us, but allows patchpacks to add the
right pieces of code to start filtering content entries on patchpack
only entries.
3 years ago
Jonathan G Rennison
b67efb7e38
Add support for retrieving JGRPP-only content from content service
...
See: https://github.com/OpenTTD/OpenTTD/pull/9541 , 84cba1b8
3 years ago
Patric Stout
84cba1b842
Add: support filtering content entries for patchpacks
...
This changes nothing for us, but allows patchpacks to add the
right pieces of code to start filtering content entries on patchpack
only entries.
(cherry picked from commit 77860bb61e61307e4d9cf869ba62be8ca4d9d9b3)
3 years ago
Jonathan G Rennison
6e3d023e69
Fix #9535 : Maintain a reverse dependency map of network content ( #9538 )
...
Fixes performance issues with dependency lookup when retrieving
content list from the content server.
3 years ago
Patric Stout
f656b0ae96
Fix: use-after-free after ClientNetworkCoordinatorSocketHandler::CloseAllConnections() ( #9534 )
...
The function clears all stun-handlers. This causes all of those
objects to be destroyed.
A handler can have a pending connecter, which was only killed in
case CloseConnection() was called. This is never the case when
the object is destroyed. In result, the connecter could finish
and cause a use-after-free by calling into the (now deleted)
handler.
3 years ago
Jonathan G Rennison
fda17d25de
Send back a message for rcon and settings_access failures
3 years ago
Jonathan G Rennison
ebab945838
Network content: Maintain a reverse dependency map
...
Fixes performance issues with dependency lookup
See: https://github.com/OpenTTD/OpenTTD/issues/9535
3 years ago
Patric Stout
306726827d
Fix a2051bad: SendCmdNames only sent one name per packet ( #9528 )
...
(cherry picked from commit 63116bd59f
)
3 years ago
Rubidium
92559e6f3a
Fix #9388 : thread unsafe use of NetworkAdminConsole/IConsolePrint
3 years ago
Patric Stout
63116bd59f
Fix a2051bad: SendCmdNames only sent one name per packet ( #9528 )
3 years ago
Patric Stout
d8e870c50c
Fix: when DNS didn't resolve any IPs, the debug message was misleading ( #9519 )
3 years ago
Patric Stout
dc5b7b996c
Fix: [Network] show query errors in the server listing instead of error popup ( #9506 )
...
When you are query several servers at once, it is rather unclear
for which server you got a popup. Instead, show any errors on the
server itself.
This is only true for the query-part. Joining a server still gives
an error popup to tell you about any issue.
3 years ago
Patric Stout
e31b5d3870
Fix #9490 : [Network] a full server couldn't be queried either ( #9508 )
...
You can now still query a full server, as long as the maximum
amount of allowed connections isn't reached. This means that as
long as there are not 255 clients connected to a server, you can
always connect to query.
3 years ago
Patric Stout
b2f0491a90
Fix #9501 : [Network] crash when more than one game-info query was pending ( #9502 )
3 years ago
Patric Stout
47ce306085
Fix c4b700f1: remove left-over debug statement ( #9510 )
3 years ago
Patric Stout
0d26359b5b
Fix: [Network] don't show GameScript " (v0)" for old servers ( #9507 )
...
Old servers don't tell the GameScript they are running, so nothing
should be shown.
All values in NetworkGameInfo initialize as 0/empty, except for GS
version. Someone has to be different from the rest, I guess.
3 years ago
Patric Stout
4066a07d8f
Fix: [Network] crash when last-joined server that is no longer available ( #9503 )
...
If you update the server-list while not having last-joined selected
and it is no longer available, the game crashed.
3 years ago
Michael Lutz
fff09a4af2
Fix d9c1d18f2: Wrong format string for console disconnect message.
3 years ago
Patric Stout
c4b700f1b0
Fix #9492 : show for what server a relay session is being created ( #9494 )
...
Currently it says "the server" which is a bit ambigious. Be more
specific.
3 years ago
Patric Stout
5da60cef46
Fix: typo in the word "spectator" (tnx Heiki) ( #9496 )
3 years ago
Patric Stout
5c776f21e7
Fix 6acf204d: crash when showing coordinator-error-messages ( #9488 )
3 years ago
Patric Stout
6acf204d14
Fix: report reuse of invite-code and switch to local game-type ( #9487 )
...
This prevents two servers battling for the same invite-code. Now
the last one wins.
3 years ago
dP
2e6a77a78a
Fix: connecting with the same name thrice hangs the server ( #9485 )
3 years ago
Patric Stout
579f393374
Add: open Online Players GUI on starting/joining a server ( #9479 )
3 years ago
Patric Stout
1ef4d3cf19
Remove: COMPANY_INFO packets and related code ( #9475 )
3 years ago
Patric Stout
3d55ea2d4d
Feature: make "join game" button join the game, instead of first showing a lobby window ( #9467 )
...
Nobody really paid attention to the lobby window, and it completely
missed its purpose. Most people don't even wait for companies to
show up, but just hit "New Company".
This in turn means people create a lot of unneeded companies, while
they "just want to watch the game" or join another company.
Instead, "Join Game" now just joins the game as spectators.
3 years ago
Patric Stout
db13eebf29
Fix 508e465b: network servers didn't show invite-code / connection-type in Online Players GUI ( #9478 )
...
The selector selects the first widget, which by accident was now only
the server visibility.
3 years ago
Patric Stout
508e465b59
Add: synchronize server name to clients and display in Online Players GUI ( #9472 )
3 years ago
Patric Stout
4c1ea4020d
Change: remove the ability to control "max spectators" ( #9466 )
...
Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
3 years ago
Rubidium
1c8f4bfaef
Fix #9388 : thread unsafe use of NetworkAdminConsole/IConsolePrint
...
(cherry picked from commit d7a0e80fc18b689455eaca09883fccbcc722d7e3)
# Conflicts:
# src/debug.cpp
# src/debug.h
# src/table/settings/gui_settings.ini
See: https://github.com/OpenTTD/OpenTTD/pull/9456
3 years ago
Jonathan G Rennison
63d8f3bdd7
Revert "Fix thread safety issues in network admin socket console logging"
...
This reverts commit ad15d4fd8f
.
3 years ago
Rubidium
ba29edb0b3
Cleanup: remove some references to the old master-server
3 years ago
Patric Stout
9cc706847c
Fix: crash when joining a server again after a TCP disconnect ( #9453 )
...
"my_client" wasn't always free'd when a game ended. "my_client"
keeps a reference inside the PT_NCLIENT pool. The rest of the
code assumes that when you are not in a game, it can freely
reset this pool.
In result: several ways to trigger a use-after-free.
3 years ago
Patric Stout
fa1e27994d
Feature: allow the use of TURN to connect client and server together
...
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.
It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
3 years ago
Patric Stout
8a36134003
Fix: [Network] rework when to close connections and inform Game Coordinator if needed
3 years ago
Rubidium
386ef4dac3
Feature: [Game Coordinator] Send NewGRF names to the client
3 years ago
rubidium42
3eaa470632
Feature: [Network] Optionally send NewGRF names with NewGRFs in GameInfo
...
Before 8a2da49
the NewGRF names were synchronized using UDP packets, however
those have been removed. With this a new version of the GameInfo packet is
introduced that allows to specify the type of serialisation happens for
NewGRFs. Either only the GRF ID and checksum, or those two plus the name of
the NewGRF.
On this request for local servers will send the NewGRFs names.
The Game Coordinator will get the names on the first registration, and after
that only the GRF ID and checksum.
3 years ago
rubidium42
5dd524139f
Fix c921f6d: [Network] Documentation of Game Info packet was not updated
3 years ago
rubidium42
09a7825d1e
Remove: the concept of UnknownGRFs
...
These were filled with "<Unknown>" (before 8a2da49
) and later their name would get filled via UDP requests to the server. These UDP packets do not exist anymore, so they will always remain "<Unknown>".
Remove that logic and just use the generic translated error GRF UNKNOWN string instead.
3 years ago
Loïc Guilloux
460991ecf4
Feature: Persistant rotation of numbered auto/netsave after restart ( #9397 )
...
It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
3 years ago
Patric Stout
29cceb59a5
Doc: explain in a bit more detail how we implemented STUN
3 years ago
Patric Stout
8adade26ed
Feature: allow the use of STUN to connect client and server together
...
This method doesn't require port-forwarding to be used, and works for
most common NAT routers in home setups. But, for sure it doesn't work
for all setups, and not everyone will be able to use this.
3 years ago
Patric Stout
55eed246b8
Codechange: allow Connect() to bind to a local address
3 years ago
Patric Stout
c921f6d817
Add: inform clients what game-script a server is running ( #9441 )
...
Co-authored-by: The Dude <thedude@novapolis.net>
3 years ago
Jonathan G Rennison
d23720cc60
Fix server crash when client joined during threaded (auto)save
3 years ago
Jonathan G Rennison
cb421294bb
Network: Log sent packets at net=5
3 years ago
Patric Stout
dd7f69be6e
Fix: "Search LAN games" used the socket after it was closed ( #9437 )
...
Every outgoing connection, either TCP or UDP, triggered
NetworkInitialize(), which triggered NetworkUDPInitialize() which
first closes all connections.
Now the problem was that "Search LAN games" found a server, added
it to the list, after which (over TCP) it queries the server. This
closes all UDP sockets (as that makes sense, I guess?), while the
UDP was still reading from it.
Solve this by simply stop initializing UDP every time we make an
outgoing TCP connection; instead only do it on start-up.
3 years ago
Rubidium
178ea3196b
Remove: includes to network/core/config.h from headers when only three cpp files need it
3 years ago
Patric Stout
b6a116a247
Add: allow setting your server visibility to "invite-only" ( #9434 )
...
In this mode you do register to the Game Coordinator, but your
server will not show up in the public server listing. You can give
your friends the invite code of the server with which they can
join.
3 years ago
Patric Stout
e4d216e44b
Feature: join servers based on their invite code
...
This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
3 years ago
Patric Stout
1baec41542
Change: groundwork to allow ServerAddress to use invite codes
...
Normally TCPConnecter will do a DNS resolving of the connection_string
and connect to it. But for SERVER_ADDRESS_INVITE_CODE this is different:
the Game Coordinator does the "resolving".
This means we need to allow TCPConnecter to not setup a connection
and allow it to be told when a connection has been setup by an external
(to TCPConnecter) part of the code. We do this by telling the (active)
socket for the connection.
This means the rest of the code doesn't need to know the TCPConnecter
is not doing a simple resolve+connect. The rest of the code only
cares the connection is established; not how it was established.
3 years ago
Patric Stout
cee8174d02
Codechange: track servers with a ServerAddress instead of a NetworkAddress
...
This allows future extensions to have different ways of referencing
a server, instead of forcing to use IP:port.
3 years ago
Patric Stout
f4dd2d88c7
Feature: raise the maximum NewGRF limit to 255
3 years ago
Rubidium
e99134654b
Feature: allow setting (game) coordinator and content server connection strings using environment variables
...
OTTD_COORDINATOR_CS for the game coordinator defaults to coordinator.openttd.org:3976
OTTD_CONTENT_SERVER_CS for the content server defaults to content.openttd.org:3978
OTTD_CONTENT_MIRROR_CS for the content mirror server defaults to binaries.openttd.org:80
3 years ago
Patric Stout
de7ab2eb1c
Cleanup: remove unused optional ctor parameter for NetworkGameList
3 years ago
Patric Stout
6212d0a8da
Remove: unused UDP protocol parts
3 years ago
Patric Stout
8a2da49413
Remove: old server listing via Master Server
...
This removes all UDP from the game except for a local broadcast
to find LAN games.
So long Master Server, and tnx for all the fish!
3 years ago
Patric Stout
61fdef8457
Remove: old server announcement to Master Server
...
As we now use the Game Coordinator for announcements, there is no
longer a need to use the Master Server for this.
3 years ago
Patric Stout
aa93d76223
Add: use Game Coordinator to get latest public server listing
3 years ago
Patric Stout
b1280fd17e
Add: use Game Coordinator to annouce public servers
3 years ago
Patric Stout
e1e2212e0e
Codechange: track version of network servers to prune once out-of-date
3 years ago
Patric Stout
cbaac5609f
Codechange: use UpdateNetworkGameWindow() over manually marking window dirty
3 years ago
Stephan
a70aa5df49
Add #9188 : netsave now keeps multiple version around, similar to autosave ( #9395 )
3 years ago
Patric Stout
852e056d6f
Fix 9e32c618: network revision was always empty ( #9419 )
...
Shadowing the variable you intend to write in tends to do that ;)
3 years ago
Patric Stout
d38079d053
Fix f7e390bd: freeaddrinfo() is not guaranteed to handle a nullptr graceful ( #9404 )
3 years ago
TELK
f9b4a3a5e6
Add: Show the number of clients and companies in the online players window ( #9376 )
3 years ago
rubidium42
cdf9caf8ea
Codechange: [Network] Remove overload on NetworkValidateClientName
...
Rename the zero-parameter NetworkValidateClientName to NetworkValidateOurClientName to make it clearer it is performed on our client name, and to make it a non-overloaded function to aid with the variant being added a few commits later
3 years ago
Andreas Schmitt
e1214a6d8b
Fix some type conversion warnings
3 years ago
Jonathan G Rennison
ad15d4fd8f
Fix thread safety issues in network admin socket console logging
...
See: https://github.com/OpenTTD/OpenTTD/issues/9388
3 years ago
Rubidium
f904aef176
Cleanup: use nullptr instead of 0 or NULL
3 years ago
SamuXarick
d0bcb9839a
Fix: you could join an AI company in multiplayer via the GUI ( #9369 )
3 years ago
rubidium42
05005dcdfa
Codechange: [Network] Use std::string instead of char[] for the name of the file that is downloading
3 years ago
rubidium42
981cd0197a
Codechange: [Network] Use std::string for the client name in the network server
3 years ago
rubidium42
a8b3afb236
Codechange: [Network] Use string_view for network compatability check
3 years ago
rubidium42
49dcf0c772
Codechange: [Network] Simplify constructing the HTTP request with fmt
3 years ago
rubidium42
53b4786037
Codechange: [Network] Let NetworkError return its std::string instead of a C-string
3 years ago
rubidium42
667301e3ec
Codechange: [Network] Make hostname/client IP return strings instead of a C-string
3 years ago
rubidium42
a91e29b656
Codechange: [Network] Let IsInNetmask use std::string
3 years ago
rubidium42
36705f1dc0
Codechange: [Network] Simplify formatting of network addresses to string
3 years ago
rubidium42
9e32c618f9
Fix: [Network] Determining GetNetworkRevisionString could overflow and underflow its buffer
...
Tagged releases are not affected
3 years ago
rubidium42
eb6cdadc4d
Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
...
Also make some strings more consistent with the rest of the console strings.
3 years ago
rubidium42
d9c1d18f2b
Change: improve some of the console messages related to networking (make them more uniform) and convert to fmt
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
rubidium42
845fded2a0
Fix #9361 , a2051ba: [Network] Off by one in CanWriteToPacket
...
Previously it did not allow writing a byte to a packet that was of size limit - 1 anymore.
3 years ago
TELK
2d0abf5a76
Fix #9362 : Hover in online players window was slightly too big ( #9364 )
...
This causes graphical glitches at the bottom of the window.
3 years ago
Jonathan G Rennison
ad0e085ec7
Fix off by one error in Packet::CanWriteToPacket
3 years ago
Jonathan G Rennison
1002c6d9d2
Fix various compiler warnings
...
See: #267
3 years ago
Jonathan G Rennison
97d5982cb5
Fix various compiler warnings
...
See: #267
3 years ago
rubidium42
bb8fd00760
Cleanup: [Network] Remove C-string Recv_string and its last use
3 years ago
rubidium42
ab9b937ab7
Codechange: [Network] Use std::string to get a NewGRF's name
3 years ago
rubidium42
e2417193c9
Cleanup: [ContentInfo] Remove some functions that are not needed anymore
3 years ago
rubidium42
e3717ae903
Codechange: [ContentInfo] Use std::string instead of string buffers
3 years ago
rubidium42
df181bb641
Codechange: [ContentInfo] Use a vector for dependencies instead of custom allocation
3 years ago
rubidium42
9c424ab741
Codechange: [ContentInfo] Use StringList for tags instead of custom allocations
3 years ago
rubidium42
dfb89f3891
Codechange: [ContentInfo] Do not use memset/memcpy to make it possible to use vector/string
3 years ago
rubidium42
6bb3f034e4
Cleanup: [ContentInfo] Remove unused function
3 years ago
Patric Stout
5e44da3010
Fix ef991b17: server was trying to free() a packet created with "new CommandPacket()" ( #9334 )
3 years ago
Rubidium
e227bbaff0
Cleanup: remove the old FIO slot functions
...
(cherry picked from commit fa6abe1646
)
3 years ago
rubidium42
8c273ed598
Codechange: [Network] Let admin-console use std::string(_view)
3 years ago
rubidium42
e58581f1f8
Codechange: [Network] Let admin-game script use std::string
3 years ago
rubidium42
8a918ce170
Codechange: [Network] Make admin name and version std::string
3 years ago
Rubidium
2606f5409a
Fix: leaking file descriptors
...
(cherry picked from commit 495d73a67f
)
3 years ago
rubidium42
62e3bfd684
Fix #9243 : [Network] For a dedicated server use a fallback client and server name
...
Also warn when the client or server name has not been set and provide pointers on how to set them
(cherry picked from commit 0968d009c8
)
3 years ago
rubidium42
e3c9ed4d15
Codechange: [Network] Use std::string to determine an unique name for clients
3 years ago
rubidium42
806f78aa04
Codechange: [Network] Use std::string to send the client name and rcon commands
3 years ago
rubidium42
fd95736bac
Codechange: [Network] Use std::string for server side logic of kicking and banning clients
3 years ago
rubidium42
f0e1cd0129
Codechange: [Network] Let server rcon result use std::string
3 years ago
rubidium42
8b9f1147df
Codechange: [Network] Let server changing a client name use std::string
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
glx22
994bf19aef
Fix f6d5c01: Delay deletion when closing windows
3 years ago
rubidium42
ef991b1772
Codechange: [Network] Use std::string in CommandPacket
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
Patric Stout
ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) ( #9304 )
...
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42
4144e949ed
Fix: [Network] Prevent an empty server name to be set anywhere
3 years ago
rubidium42
e2f5d9e561
Codechange: use separate pre and post callbacks for string settings
3 years ago
rubidium42
208952f2ba
Codechange: split Write_ValidateSetting to get separate functions for making strings valid and writing strings
3 years ago
rubidium42
8ffb4122df
Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company
3 years ago
rubidium42
72ec81325b
Cleanup: remove unneeded temporary variables and casts
3 years ago
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
3 years ago
milek7
7607277380
Fix: Network on Haiku, remove old code for BeOS
3 years ago
Jonathan G Rennison
66289bbda4
Log packet size parse failures in NetworkTCPSocketHandler
3 years ago
Jonathan G Rennison
6d58115458
Net: Log sent and received game packets with type and status names
3 years ago
Jonathan G Rennison
7677d2d01a
Fix mishandling of PACKET_SERVER_MAP_BEGIN queuing at server
...
This could result in broken packet framing in the TCP stream
3 years ago
Milek7
7ab6ab7400
Fix: missing <limits> include in network/core/packet.h ( #9123 )
...
(cherry picked from commit a341852cd5
)
3 years ago
rubidium42
e2dc5aa83e
Codechange: [Network] Use C++ string functions to generate company password hash
3 years ago
rubidium42
4d246cda73
Codechange: [Network] Let NetworkClientInfo use std::string
3 years ago
rubidium42
83679c0e57
Codechange: [Network] Use std::string to populate the client list for company stats
3 years ago