Commit Graph

69 Commits

Author SHA1 Message Date
Darkvater 271af9fbfc (svn r4679) - Backport from trunk (r4521):
Fix: be consistent about the size of the player-name in MP. This
  hopefully fixes a crash on lesser OS's (eg Win98)
2006-05-02 13:47:00 +00:00
Darkvater f8eb72e188 (svn r4666) - Backport from trunk (r4267):
Validate the error number that a client receives from a server, and
  encapsulate this functionality into GetNetworkErrorMsg()
2006-05-02 12:58:13 +00:00
Darkvater f9a2d113ab (svn r4665) - Backport from trunk (r4241, r4243):
Fix: Perform validation on the error number that a server receives
  from a client. An invalid value may cause the server to terminate.
2006-05-02 12:54:23 +00:00
celestar ca0a0cdbfd (svn r4015) -Backport from trunk: Default the patch-setting 'pause_on_join' to true. 2006-03-22 11:17:21 +00:00
Darkvater f2448ebfd4 (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. 2006-01-31 22:16:15 +00:00
Darkvater a8758cbf5e (svn r3430) - You can of course not join when there are more companies than the maximum set, not the other way around. 2006-01-25 19:14:50 +00:00
Darkvater 78fa9c7393 (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. 2006-01-25 18:11:06 +00:00
tron e272b03fee (svn r3365) Staticise 36 functions 2006-01-05 12:40:50 +00:00
bjarni 22a4679837 (svn r3218) -Feature: Multiheaded train engines will now stay in the same train
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
	This fixes the assert when moving multiheaded engines (introduced in r3144)
	Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs

-Codechange: train subtype is now a bitmask
	This allows fast access to info like if it is a wagon or engine and if it is in front and so on
	Note: savegame version bump
2005-11-18 23:41:03 +00:00
Darkvater e611fee4e5 (svn r3067) - Feature: allow unbanning players based on banlist-id (as well as IP).
- Feature: 'status' and 'clients' now show the IP of the players
2005-10-19 19:38:35 +00:00
tron d975abc96c (svn r2899) -Fix: Several format string vulnerabilities and buffer overflows in the network code 2005-08-28 12:24:57 +00:00
tron 2b4e85db0b (svn r2828) Only command.c needs to know about _docommand_recursive, so make it static. Tell me if there's a problem, because i removed it from network_server.c, but afaict it should be ok 2005-08-07 10:03:14 +00:00
ludde bb1e1f2b5f (svn r2755) Fix: Fix a desync issue with autoreplace 2005-07-29 21:55:49 +00:00
tron af9f55c977 (svn r2720) Remove unused declarations and definitions 2005-07-26 19:34:03 +00:00
tron 7e65f44168 (svn r2716) Do not use strncat() 2005-07-26 18:47:04 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 559babcdc9 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
tron 18d79cc30f (svn r2672) Move saving/loading related declarations to saveload.h 2005-07-22 06:31:31 +00:00
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 2005-07-21 22:15:02 +00:00
ludde 11d9f50115 (svn r2591) Codechange: [network] Cleanup NetworkHandleCommandQueue 2005-07-16 15:05:52 +00:00
ludde 8ff1f8c526 (svn r2589) Fix: [network] Fixed static variable that wasn't initialized. Would stop the sync checking from working in some cases. 2005-07-16 12:59:23 +00:00
ludde f12b3a0c18 (svn r2588) Codechange: Remove PLAYER_SEED_RANDOM 2005-07-16 12:30:03 +00:00
ludde 71f9078bdd (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
2005-07-15 20:29:06 +00:00
celestar b29556e6b5 (svn r2521) -Codechange: Removed trailing "\n"s from DEBUG statements 2005-07-05 17:47:10 +00:00
celestar aa7334a3ec (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 2005-06-21 16:28:17 +00:00
Darkvater 54b7fb0203 (svn r2339) - Fix: on a dedicated server, after the joining of a player, the player was set to player 0 instead of remaining OWNER_SPECTATOR. Fix this, and allow the dedicated server to execute commands (so 'patch <value>') now works and not only when a client is connected. 2005-05-17 18:22:59 +00:00
tron fea5965679 (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes. 2005-05-15 18:50:55 +00:00
Darkvater d99dddc704 (svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;) 2005-05-14 19:34:59 +00:00
Darkvater 2bf3d14dfc (svn r2308) - Fix: enforce server-only and/or offline commands by giving them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security"
- CodeChange: move ValParamRailtype() to check rail type from command.h to vehicle.h where it is better suited.
2005-05-14 19:25:18 +00:00
Darkvater 56e7e4cf25 (svn r2299) - Fix: add more verbose output to possible hack-attempt.
- Btw, only 14 more commands are remaining, 88% done \o/
2005-05-12 00:20:16 +00:00
matthijs 6eb094c726 (svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
- Add: GetVehicleTrackdir() helper function.
- Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed.
- Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte".
- Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
2005-05-02 23:59:11 +00:00
truelight 508738f836 (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)
2005-03-29 19:10:13 +00:00
tron b2ae5b197e (svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics 2005-02-06 13:41:02 +00:00
tron 0381073e56 (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) 2005-02-06 08:18:00 +00:00
tron f0f85a7ef3 (svn r1803) Move debugging stuff into files of it's own 2005-02-05 15:58:59 +00:00
tron 189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 2005-01-22 20:23:18 +00:00
bjarni 2fd3553d78 (svn r1568) made an enum of train subtypes to make the code more readable 2005-01-19 19:15:03 +00:00
truelight 8521367373 (svn r1546) -Fix: possible buffer-overflow in network 2005-01-16 17:19:37 +00:00
truelight 24c9e6ff66 (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!
2005-01-15 20:09:16 +00:00
darkvater f9b5f704b1 (svn r1518) -Fix: server issue where some company names were wrong
-Fix: Highscore troubles; accessing members of deleted window
2005-01-15 01:52:23 +00:00
truelight e9a57c56b7 (svn r1510) -Add: Improved Network Lobby GUI: (bociusz)
- Added green dot if company income is positive (else red dot)
 - Added lock icon if company is password protected
2005-01-14 21:47:35 +00:00
darkvater 29b4ab04c3 (svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it. 2005-01-10 14:43:00 +00:00
tron 49584082a0 (svn r1451) Fix some of the signed/unsigned comparison warnings 2005-01-09 21:25:44 +00:00
truelight 523a6a1cff (svn r1389) -Add: [Network] Added packet protection. No longer a client or server
reads beyond the size of the packet
-Fix: [Network] A server no longer crashes when a client sends an 
invalid DoCommand, but drops the client instead.
2005-01-05 14:39:48 +00:00
truelight a11f46fed4 (svn r1322) -Add: banning system (mostly tnx to guru3)
A server can ban people via ClientList
  Both server and dedicated can do it via console:
   'ban', 'unban', 'banlist'.
2005-01-02 12:03:43 +00:00
truelight a0716c39de (svn r1320) -Fix: fixed chat-bug (that from a certain moment, nobody could talk).. 1
variable was still byte instead of uint16 (with a very big tnx to guru3!)
2005-01-01 16:34:54 +00:00
miham 57852f6498 (svn r1297) Language fixes in the source.. (ln-) 2004-12-29 13:13:29 +00:00
truelight 97ec7de9e6 (svn r1263) -Fix: [Network] Client-names are limited (serverside) to 25 chars
-Fix: You can enter some more chars in the chatbox
2004-12-23 20:33:57 +00:00
truelight c9645885d0 (svn r1252) -Add: [Network] With 'set restart_game_date' you can set the date for in
which year the server must restart hisself. (0 = disabled, default value)
2004-12-23 17:37:26 +00:00
truelight a14a78de34 (svn r1246) -Fix: [ 1090099 ] Company-messages did crash the game, because
company-index was sent, which should have been the client-index
2004-12-23 13:53:05 +00:00