Commit Graph

122 Commits (5a86b502c2f553096f88d7f84241e0f3e581fcb2)

Author SHA1 Message Date
Darkvater 4a25ee9377 (svn r6170) -Feature: save max_companies/clients/spectators in the config file. 18 years ago
rubidium b317c679dd (svn r5928) -Cleanup: remove ConvertIntDate and use ConvertYMDToDate as ConvertIntDate was only called with Years. 18 years ago
rubidium dc54e608e3 (svn r5915) -Cleanup: some variables were named *_date while they were only holding years; rename these variables to match this. 18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron 150b9cb869 (svn r5298) Hide function declarations and remove function stubs which aren't needed in the !ENABLE_NETWORK case 18 years ago
tron d9febd1458 (svn r5297) Check the interface flags if IFF_BROADCAST is set before asking for the broadcast address 18 years ago
tron 325e460ca9 (svn r5295) Handle a quirk in the Windows interface detection code and fix a typo in r5293 (thanks to Darkvater for testing) 18 years ago
tron 213061ef47 (svn r5293) -Fix: Not all network interfaces are capable of broadcasting. Don't record those which aren't
-Fix: Not all networks are /24. Generate proper broadcast addresses for non-/24 nets
18 years ago
tron 9e130fe09e (svn r5292) -Fix: When using SIOCGIFCONF to detect network interfaces accomodate for the fact that struct sockaddr doesn't have fixed size in all implementations 18 years ago
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
Darkvater 580f364cc9 (svn r4521) - Fix: be consistent about the size of the player-name in MP. This hopefully fixes a crash on lesser OS's (eg Win98). Use ttd_strlcpy() to just copy over strings and properly terminate them because different implementations of snprintf() behave differently. Courtesy of TrueLight 18 years ago
Darkvater 8e6e35226d (svn r4268) - Delete the network-copy of the Patches struct as it is not needed anymore. All relevant patch-settings that are changed by a network-game are those that are saved with a savegame, so these are not affected for loaded games (since Patches are saved with them). Also there is a distinction between in-game patch settings and default patch settings and this is not affected in MP. Thus this temp copy can be removed. 19 years ago
Darkvater 6c3c1c22d3 (svn r4267) - Fix (r4241): also validate the error number that a client receives from a server, and encapsulate this functionality into GetNetworkErrorMsg(). 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
Darkvater 5502f3bf3d (svn r3500) - Workaround the inaccurate count of spectators/companies that can happen in certain border-cases. For now just dynamically get this value when requested so it is always right. To do properly all player/client creation/destruction needs a hook for networking. 19 years ago
Darkvater e051091c35 (svn r3470) - Fix: plug a memleak in _network_host_list. 19 years ago
Darkvater f14df34790 (svn r3429) - Feature (Followup): Change the gamelist window to accomodate for the new information. 19 years ago
Darkvater 082aa38f79 (svn r3427) - Feature: Allow seeing and setting the maximum amount of companies and spectators for a server. This can be changed/viewed during runtime as well in the console. 19 years ago
peter1138 c56ae910f0 (svn r3409) - Change the server advertisement interval to use the frame counter instead
of game days. This allows a paused server to continue to advertise itself.
  This also fixes advertising for games that start before 1922.
19 years ago
Darkvater ad47f3a6a2 (svn r3407) - Feature: Kick and ban now with IP numbers. 19 years ago
tron 9d0e7b6458 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
tron f02b1f2967 (svn r2899) -Fix: Several format string vulnerabilities and buffer overflows in the network code 19 years ago
ludde 228d439c5c (svn r2755) Fix: Fix a desync issue with autoreplace 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron b0779b4b65 (svn r2663) Include variables.h only in these files which need it, not globally via openttd.h 19 years ago
ludde 7ddd9fe0e3 (svn r2590) Fix: [network] Fixed NetworkHandleLocalQueue 19 years ago
ludde 41d4eed3fb (svn r2589) Fix: [network] Fixed static variable that wasn't initialized. Would stop the sync checking from working in some cases. 19 years ago
ludde 04e45dac34 (svn r2588) Codechange: Remove PLAYER_SEED_RANDOM 19 years ago
ludde fd0cee7418 (svn r2583) Move OS specific code out of misc.c
Added support for Mersenne Twister random number generator (not implemented in network yet)
Wrap player randoms around #ifdef
19 years ago
ludde 8086017097 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
19 years ago
tron 1273f21ff5 (svn r2405) Simplify a few '? true : false' and '? false : true', especially the latter is confusing 19 years ago
truelight 3965366b97 (svn r2337) -Fix: NetworkUDPRemoveAdvertise wasn't fully correct (which made Darkvater go crazy ;)) 19 years ago
Darkvater 22a375ba73 (svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
- Some variables are really special and cannot be assigned normally, use their callback procedure for assignment/querying. This commit also obsoletes "[1172804] Console set command cleanup"
19 years ago
Darkvater f208f5fa10 (svn r2157) - Feature (request): [ 1166978 ] Focus keyboard on input-box in Multiplayer Menu
- Feature: If the to be started server is using a password, draw a red '*' after the set password button to remind the user.
20 years ago
Darkvater 31a7ef9933 (svn r2126) - Fix: #2 Fix compilation with network disabled, and comment out some of the warnings (unused function) (I missed this out the last commit, sorry) 20 years ago
truelight 9ebe54c1ae (svn r2108) -Fix: the server now also unpause when a client desyncs or something 20 years ago
truelight 40a9b91b37 (svn r2106) -Fix: improved the network-join algoritm, it is now a bit more stable
-Add: added 'pause_on_join' and 'max_join_time' for MP games, where you 
can auto-pause the game when a client wants to join the game. This to 
avoid connection losses because of big maps (200+ trains). (with tnx to 
#openttdcoop for the ideas and testing)
20 years ago
tron 5f1345ac0e (svn r1970) Fix some warnings which Cygwin showed 20 years ago
tron 8f741f44c4 (svn r1836) Clean up some strange constructs concerning socket options 20 years ago
tron 257e97c09a (svn r1833) byte -> char transition: the rest 20 years ago
tron 59fa465dce (svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics 20 years ago
tron d3f84347ac (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c) 20 years ago
tron 36c9758c94 (svn r1803) Move debugging stuff into files of it's own 20 years ago
tron 97f893ae2f (svn r1596) Add some more statics 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
truelight 27929d129b (svn r1527) -Add: RCon (Remote Connection). A server can set:
'set rcon_pw <password>'
  Which enables rcon. A client can now do:
    'rcon <password> "<command>"'
  The command will be executed on the server. (guru3)
-Fix: 'kick 1' did crash dedicated servers
-Fix: server password is now correctly saved

  !!Warning!!: do not give your rcon password to people you do not thrust!
20 years ago
tron 94c6bdfdaf (svn r1509) Const correctness and add static where appropriate while touching the lines anyway 20 years ago
tron 4450ff105c (svn r1451) Fix some of the signed/unsigned comparison warnings 20 years ago