Age | Commit message (Collapse) | Author |
|
One also looks for a company, the other doesn't. There were more
uses of the latter than the first, leaving very weird code all
over the place.
|
|
This commit adds the missing feature of allowing the server owner to
provide a reason for kicking/banning a client, which the client sees in
a pop-up window after being kicked. The implementation extends the
network protocol by adding a new network action called
NETWORK_ACTION_KICKED that is capable of having an error string, unlike
the other network error packages. Additionally, the kick function
broadcasts a message to all clients about the kicked client and the
reason for the kick.
|
|
|
|
|
|
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.
Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.
A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.
With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.
All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
|
|
with no clients the tick length was increased significantly, making any assumptions about the tick length used further down in the code are not true anymore. One of such assumptions was that one should readvertise every 15 minutes worth of original ticks, but due to the lengthening this timeframe would be more like 45-60 minutes. Now we'll take the operating system's millisecond counter instead
|
|
|
|
state information upon creation of their company
|
|
|
|
name, and move the UDP specific bits to network_udp
|
|
on servers (including starting a company with the default password) failed, so no client could join.
|
|
ClientSocket, after all the Socket is the bit that's associated with the network
|
|
ClientID, which later resolves the IP address to ban. This to consolidate the knowledge about resolving IP addresses
|
|
NetworkClientInfo::GetByClientID
|
|
possible to change the password of other companies (on the server)
|
|
and remove some unneeded casts
|
|
unrelated to the number of passed game days, i.e. don't stop aging chat messages when the server is paused
|
|
(dihedral)
|
|
specific intervals (dihedral)
|
|
and dihedral)
|
|
static in that file.
|
|
NetworkFindClientInfoFromIP().
|
|
(anymore) otherwise.
|
|
|
|
to spectators
|
|
|
|
if a header require a header make it include that header
|
|
executing the pause command. This to prevent showing paused and especially unpaused to be shown when the state doesn't change. Output now mentions whether pause changes keep the game paused and what reasons for pausing there 'currently' are.
|
|
'generic' includes so compilation without network support doesn't get broken as easily by changes in header files
|
|
did not get properly updated when the NewGRFs were rescanned causing reading of freed data
|
|
|
|
via command line when joining a server (based on patch by Progman, Ammler and planetmaker)
|
|
_local_company, but only as a storage location for the company you want to join in MP.
|
|
printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
|
|
delayed so much that the network stuff was already closed and the packet would never reach the master server causing the server to appear online longer than necessary.
|
|
[network]:server_bind_ip doesn't exist anymore. Add the IPs/hostnames to [server_bind_addresses]
|
|
client_address.
|
|
|
|
|
|
window crashed the server
|
|
|
|
the server and the clients themselves (dihedral)
|
|
names (based on patch by dihedral)
|
|
and connect to game servers.
|
|
structure so we can pass either one of them and not convert an ip to a string and then back again.
|
|
|
|
|
|
(not enough players)" fully translateable.
|
|
#include dependencies.
|
|
replace looping socket structs with info structs when the loop is only interested in the info structs (i.e. not derefing the info from sockets when one can loop info directly and the socket isn't used)
|