Commit Graph

39 Commits (aafce475963e2d2df59de9b02242a04856e78f93)

Author SHA1 Message Date
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
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.
5 years ago
Niels Martin Hansen 5f8354f358 Change: Make a shortened network revision string for use in server queries 5 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
planetmaker 189dd2dcce (svn r25845) -Add [FS#5756]: [Admin] Send info on bankruptcy quarters also in ADMIN_PACKET_SERVER_COMPANY_INFO (zydeco) 11 years ago
planetmaker 2e390613a6 (svn r25589) -Fix [FS#5646]: Ensure that sent and received length of json strings are the same (based on patch by Xaroth) 11 years ago
planetmaker 7686587f02 (svn r25588) -Feature [FS#5643]: PING and PONG packets for admin port (Xaroth) 11 years ago
planetmaker 4a1bf704ee (svn r25587) -Add FS#5643: Conclude rcon output sent to admin clients with an RCON_END packet (Xaroth) 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch 50806b5b3c (svn r24620) -Fix (r24619): Keep admin port API compatibility. 12 years ago
planetmaker f2e94237fc (svn r24619) -Change: Check for bankruptcy on a monthly basis (ZxBioHazardZx) 12 years ago
rubidium 70c7fbd90e (svn r23826) -Fix [FS#4972]: the detailed performance rating window showed the cargo count of the current quarter instead of the last quarter like the tooltip says 13 years ago
truebrain 3a535690d4 (svn r23623) -Add: allow bi-directional communication with the AdminPort and GameScript 13 years ago
rubidium c8857d4679 (svn r23115) -Fix [FS#4813]: allow accessing the server's client info as well in the admin network (dihedral) 13 years ago
rubidium 998bbde49e (svn r22934) -Fix [FS#4771]: prevent authentication bypass for the admin port when a new game is started 13 years ago
rubidium c4aa943aaa (svn r22424) -Document: some more bits 13 years ago
rubidium 944a5cb7aa (svn r22423) -Document: some network stuff 13 years ago
rubidium b2efd73773 (svn r22398) -Codechange: remove some defines from the tcp/admin code, so doxygen can create better documentation 13 years ago
rubidium cdfc0ec4a3 (svn r22369) -Codechange: allocate ClientInfo when needed, i.e. don't allocate it for clients that are there to just get a list of companies. This means that these short lived clients won't be seen by the admin network in their client queries anymore 13 years ago
rubidium 2cae0cd54c (svn r22368) -Codechange: move the IP address field from the ClientInfo to ClientSocket 13 years ago
rubidium 146d532d51 (svn r22367) -Codechange: send ClientSockets instead of ClientInfos to the admin "core" as they send IP addresses to the admin "bots" 13 years ago
rubidium bc9a803ea9 (svn r22362) -Codechange: NetworkFindClientInfoFromClientID -> NetworkClientInfo::GetByClientID 13 years ago
smatz d2d6b263b3 (svn r22085) -Fix: assert when connecting to the admin port 14 years ago
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 14 years ago
planetmaker 51b97aa3c1 (svn r21741) -Fix (r21668): Some white space slipped past the commit hook 14 years ago
rubidium b25cf57542 (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 14 years ago
rubidium 6546561360 (svn r21668) -Feature: command logging using the admin interface (dihedral) 14 years ago
rubidium 1dfd5c6405 (svn r21420) -Fix: admins were always given the stats of company 0 14 years ago
rubidium b6c2216749 (svn r21358) -Codechange: make some network function names conform to coding style 14 years ago
rubidium a5d414a734 (svn r20975) -Add: logging of console output for remote admins (dihedral) 14 years ago
rubidium ad12a91cda (svn r20974) -Add: remote console (rcon) for remote admins (dihedral) 14 years ago
rubidium d9602f4ef9 (svn r20973) -Add: chat sending and receiving support for remote admins (dihedral) 14 years ago
rubidium 459514afe4 (svn r20972) -Add: company statistics updates at intervals to remote admins (dihedral) 14 years ago
rubidium ca5d9f7002 (svn r20971) -Add: company economy updates at intervals to remote admins (dihedral) 14 years ago
rubidium ae20cb4f3d (svn r20970) -Add: company change notification to remote admins (dihedral) 14 years ago
rubidium fe44944f32 (svn r20969) -Add: client info change notification to remote admins (dihedral) 14 years ago
rubidium 901c4a56bd (svn r20968) -Add: date notification of remote admins (dihedral) 14 years ago
rubidium b4ce7fad7f (svn r20967) -Add: infrastructure to send information to remote admins at specific intervals (dihedral) 14 years ago
rubidium 61ae6b6e40 (svn r20964) -Add: disconnecting remote admins that fail to authenticate 14 years ago
rubidium 33ed4ddbfb (svn r20963) -Add: stubs for a remote administration connection 14 years ago