Commit Graph

46 Commits

Author SHA1 Message Date
Patric Stout 53c28a8ec9 Codechange: [Network] replace _realtime_tick with std::chrono 2021-02-27 00:36:14 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
glx 41232f18c1 Codechange: Replace network related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
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.
2019-03-20 19:24:55 +01:00
Niels Martin Hansen 5f8354f358 Change: Make a shortened network revision string for use in server queries 2019-02-03 18:00:16 +01:00
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 2014-04-23 20:13:33 +00:00
planetmaker 189dd2dcce (svn r25845) -Add [FS#5756]: [Admin] Send info on bankruptcy quarters also in ADMIN_PACKET_SERVER_COMPANY_INFO (zydeco) 2013-10-12 17:03:15 +00:00
planetmaker 2e390613a6 (svn r25589) -Fix [FS#5646]: Ensure that sent and received length of json strings are the same (based on patch by Xaroth) 2013-07-12 17:11:16 +00:00
planetmaker 7686587f02 (svn r25588) -Feature [FS#5643]: PING and PONG packets for admin port (Xaroth) 2013-07-11 20:31:39 +00:00
planetmaker 4a1bf704ee (svn r25587) -Add FS#5643: Conclude rcon output sent to admin clients with an RCON_END packet (Xaroth) 2013-07-11 19:57:40 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch 50806b5b3c (svn r24620) -Fix (r24619): Keep admin port API compatibility. 2012-10-21 09:15:57 +00:00
planetmaker f2e94237fc (svn r24619) -Change: Check for bankruptcy on a monthly basis (ZxBioHazardZx) 2012-10-20 22:05:26 +00:00
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 2012-01-20 20:18:19 +00:00
truebrain 3a535690d4 (svn r23623) -Add: allow bi-directional communication with the AdminPort and GameScript 2011-12-19 21:00:32 +00:00
rubidium c8857d4679 (svn r23115) -Fix [FS#4813]: allow accessing the server's client info as well in the admin network (dihedral) 2011-11-04 22:32:21 +00:00
rubidium 998bbde49e (svn r22934) -Fix [FS#4771]: prevent authentication bypass for the admin port when a new game is started 2011-09-15 18:28:39 +00:00
rubidium c4aa943aaa (svn r22424) -Document: some more bits 2011-05-05 16:24:48 +00:00
rubidium 944a5cb7aa (svn r22423) -Document: some network stuff 2011-05-04 20:24:23 +00:00
rubidium b2efd73773 (svn r22398) -Codechange: remove some defines from the tcp/admin code, so doxygen can create better documentation 2011-05-01 11:01:57 +00:00
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 2011-04-22 16:05:05 +00:00
rubidium 2cae0cd54c (svn r22368) -Codechange: move the IP address field from the ClientInfo to ClientSocket 2011-04-22 16:03:48 +00:00
rubidium 146d532d51 (svn r22367) -Codechange: send ClientSockets instead of ClientInfos to the admin "core" as they send IP addresses to the admin "bots" 2011-04-22 16:03:13 +00:00
rubidium bc9a803ea9 (svn r22362) -Codechange: NetworkFindClientInfoFromClientID -> NetworkClientInfo::GetByClientID 2011-04-22 15:54:16 +00:00
smatz d2d6b263b3 (svn r22085) -Fix: assert when connecting to the admin port 2011-02-15 12:11:28 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
planetmaker 51b97aa3c1 (svn r21741) -Fix (r21668): Some white space slipped past the commit hook 2011-01-08 16:10:07 +00:00
rubidium b25cf57542 (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 2011-01-03 12:01:41 +00:00
rubidium 6546561360 (svn r21668) -Feature: command logging using the admin interface (dihedral) 2010-12-30 18:14:37 +00:00
rubidium 1dfd5c6405 (svn r21420) -Fix: admins were always given the stats of company 0 2010-12-06 14:55:47 +00:00
rubidium b6c2216749 (svn r21358) -Codechange: make some network function names conform to coding style 2010-11-30 13:38:46 +00:00
rubidium a5d414a734 (svn r20975) -Add: logging of console output for remote admins (dihedral) 2010-10-17 17:43:01 +00:00
rubidium ad12a91cda (svn r20974) -Add: remote console (rcon) for remote admins (dihedral) 2010-10-17 17:41:52 +00:00
rubidium d9602f4ef9 (svn r20973) -Add: chat sending and receiving support for remote admins (dihedral) 2010-10-17 17:40:18 +00:00
rubidium 459514afe4 (svn r20972) -Add: company statistics updates at intervals to remote admins (dihedral) 2010-10-17 17:38:41 +00:00
rubidium ca5d9f7002 (svn r20971) -Add: company economy updates at intervals to remote admins (dihedral) 2010-10-17 17:38:16 +00:00
rubidium ae20cb4f3d (svn r20970) -Add: company change notification to remote admins (dihedral) 2010-10-17 17:37:45 +00:00
rubidium fe44944f32 (svn r20969) -Add: client info change notification to remote admins (dihedral) 2010-10-17 17:37:26 +00:00
rubidium 901c4a56bd (svn r20968) -Add: date notification of remote admins (dihedral) 2010-10-17 17:36:59 +00:00
rubidium b4ce7fad7f (svn r20967) -Add: infrastructure to send information to remote admins at specific intervals (dihedral) 2010-10-17 17:36:23 +00:00
rubidium 61ae6b6e40 (svn r20964) -Add: disconnecting remote admins that fail to authenticate 2010-10-17 17:33:46 +00:00
rubidium 33ed4ddbfb (svn r20963) -Add: stubs for a remote administration connection 2010-10-17 17:31:03 +00:00