Commit Graph

49 Commits

Author SHA1 Message Date
Rubidium 849d1fa1b3 Cleanup: remove UI for asking user for company password 2024-05-07 00:03:15 +02:00
Rubidium 71fc907584 Change: remove company passwords over client allow lists 2024-05-07 00:03:15 +02:00
Rubidium f599108c16 Codechange: move 'months_empty' to CompanyProperties 2024-03-23 11:59:34 +01:00
Rubidium 7580eac2d5 Codechange: create helper class for useful NetworkAuthorizedKeys functions 2024-03-18 22:56:58 +01:00
Rubidium 5706801ea7 Feature: authenticate to the server without sending the password
Either using password-authentication key exchange or via authorized keys
2024-03-17 19:09:22 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium aa5ba5bd7f Codechange: allow certain enumeration to be added
Otherwise C++20 doesn't like it.
2024-01-16 23:30:23 +01:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
dP 31cf9e888b
Add: [Network] external chat messages for remote admins (#9563) 2021-09-19 23:09:06 +02:00
Rubidium 178ea3196b Remove: includes to network/core/config.h from headers when only three cpp files need it 2021-07-11 22:13:59 +02:00
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.
2021-07-11 21:57:05 +02:00
Patric Stout b1280fd17e Add: use Game Coordinator to annouce public servers 2021-07-10 20:17:07 +02:00
rubidium42 98283116fa Codechange: [Network] Make company state password std::string 2021-05-14 23:22:04 +02:00
Patric Stout cb2ef1ea4b Codechange: move all NetworkGameInfo related functions to a single file
It currently was a bit scattered over the place. Part of
NetworkGameInfo is also the GRF Identifiers that goes with it.
2021-04-27 20:18:53 +02:00
rubidium42 e1cebe0ea0 Add: [Network] Validate the client name server side, so no clients with invalid names can actually join 2021-04-24 08:02:54 +02:00
frosch 7fe291667f Fix #8060, 5880f14: Restore admin network API compatibility. 2020-04-05 18:36:21 +01:00
Bjarni Thor 5880f1479f Feature #7756: Allow server to supply a reason to kicked/banned clients
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.
2020-02-04 22:17:39 +00:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Charles Pigott fe9731d32c Fix: clang and MSVC warnings (glx) 2019-09-30 14:00:06 +01: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
truebrain 6c7c02eb14 (svn r23780) -Fix [FS#4963] (r23764): also name the two new errors server-side. As extra, split up one of the errors in 3 errors, to be more specific what goes wrong. As cherry on top, make sure on all sides we can never again forget to add such entries on both sides, by introducing an assert_compile() 2012-01-09 21:22:48 +00:00
rubidium bddfcaef95 (svn r23764) -Fix [FS#4955]: make default timeouts for certain states lower and configurable 2012-01-06 21:49:06 +00:00
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 2011-05-02 16:14:23 +00:00
rubidium 33ed4ddbfb (svn r20963) -Add: stubs for a remote administration connection 2010-10-17 17:31:03 +00:00
rubidium a4c6d07edc (svn r20553) -Feature: allow rate limiting of incoming commands 2010-08-19 08:59:36 +00:00
rubidium 99a11badaf (svn r19996) -Codechange: Add NetworkVehicleType enum. 2010-06-19 16:37:56 +00:00
rubidium 2555522eab (svn r19809) -Codechange: make some unnamed network related enums/defines static const variables 2010-05-13 09:04:41 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 2a1cab4d46 (svn r18052) -Codechange/Fix: make the 'pause' chat message when actually 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. 2009-11-12 20:33:30 +00:00
rubidium c08c10f329 (svn r18048) -Change: make no distinction between unpausing because of a client aborting to join or actually joining 2009-11-12 17:27:24 +00:00
rubidium 5ff6053326 (svn r17699) -Codechange: move #ifdef ENABLE_NETWORK till after the 'generic' includes so compilation without network support doesn't get broken as easily by changes in header files 2009-10-04 20:00:56 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
rubidium 82f8badc07 (svn r15969) -Codechange: make the list of broadcast addresses virtually unlimited. 2009-04-07 19:06:36 +00:00
rubidium 04709f2798 (svn r15242) -Feature: allow moving clients between companies/spectators by the server and the clients themselves (dihedral) 2009-01-23 22:18:06 +00:00
rubidium 28a641066e (svn r15163) -Change/Fix: use a non-blocking method to resolve the hostname and connect to game servers. 2009-01-20 11:28:18 +00:00
rubidium 5f3772a42c (svn r15157) -Codechange: wrap the hostname/ip and port into a single structure so we can pass either one of them and not convert an ip to a string and then back again. 2009-01-20 01:32:06 +00:00
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium a25e3f8d70 (svn r14764) -Codechange: make the '***' chat messages like "Game paused (not enough players)" fully translateable. 2008-12-29 10:37:53 +00:00
rubidium afddfcb2b1 (svn r14730) -Codechange: remove the need for networkclientsockets and networkclientinfo structs to be in a contiguous piece of memory and put them in a pool.
-Note: 255 should really be enough for now... making it any more means network protocol bumps.
2008-12-23 20:52:27 +00:00
rubidium f8f7febe41 (svn r14725) -Change: make it clearer why (and that) MAX_CLIENTS isn't the amount of slots in the array, but one less as a dedicated server takes a slot too. 2008-12-23 11:55:46 +00:00
rubidium 9476a49763 (svn r14723) -Codechange: shuffling some stuff around to reduce indirect #include dependencies. 2008-12-23 11:06:52 +00:00
rubidium abc903d625 (svn r14712) -Codechange: split server and client side w.r.t. the storage of network related company information. 2008-12-22 18:40:57 +00:00
rubidium 782b80eff7 (svn r14709) -Codechange: make a clearer distinction between 'unique' client identification ids and the indices into the clients/client info arrays. 2008-12-22 12:59:31 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
rubidium 3b4c3a3df6 (svn r14045) -Codechange: move the network's limitation to chat messages to a more logical location and give it a more consistent name. 2008-08-11 22:07:26 +00:00
rubidium 2e4f32023c (svn r13712) -Fix: enforce the length restrictions of company and president name in the commands too. 2008-07-17 11:19:20 +00:00
rubidium 2f3b88ef9a (svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers. 2008-05-30 18:20:26 +00:00