Commit Graph

38 Commits

Author SHA1 Message Date
rubidium 1e7cca8f8b (svn r9344) [0.5] -Backport from trunk (r9027, r9038, r9061, r9071):
- Fix: desync caused by buffer overflow (r9027)
- Feature: kick inactive initial network connections after some time (r9038, r9061)
- Fix: take over companies properly in multiplayer games (r9071)
2007-03-19 19:34:44 +00:00
rubidium 4e1c7b8197 (svn r8489) [0.5] -Backport from trunk (8459, 8461): check for NewGRF compatability before actually downloading the map from a game server when connecting from the command prompt and internal console. 2007-01-31 12:39:41 +00:00
rubidium 32db875d97 (svn r7505) -Feature: show NewGRFs used on a game server, show which NewGRFs you do and do not have.
-Feature: show NewGRF compatability of network games in the Game List window; a green square if you got the same OpenTTD version and have the needed NewGRF, a red square if the version does not match and a yellow square if the version matches, but the client is missing at least one of the NewGRFs.
2006-12-18 12:26:55 +00:00
Darkvater 929cfa6687 (svn r6932) -Codechange: Send server messages with format NETWORK_ACTION_SERVER_MESSAGE so it is
general colour like the rest of the server messages. Spectators speak in grey.
2006-10-24 22:23:08 +00:00
Darkvater ee27bb497c (svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
2006-10-21 23:31:34 +00:00
Darkvater 91b9b3ab18 (svn r6876) -Codechange: Change the naming of _PLAYER in DESTTYPE_PLAYER/NETWORK_ACTION_CHAT_PLAYER
to _COMPANY as that is whom you are really addressing to. Also change some variable
 names, 'desttype' is confusing if there is also a parameter 'dest', so rename it to
 just type.
2006-10-21 22:29:14 +00:00
Darkvater b944a133cb (svn r6824) -Feature: Change the functionality of the chat window. SHIFT+ENTER (SHIFT+T)
sends a message to all players, CTRL+ENTER (CTRL+T) sends a message to all
 team mates and ENTER (T) sends a message to teammates if you have any, otherwise
 to all players.
 The chat-window now also shows what kind of message is being sent. Shortcut
 functionality has not been changed (ENTER sends message, ESC closes window)
2006-10-18 21:07:36 +00:00
Darkvater 68314cf576 (svn r6820) -Codechange: Some more const correctness, coding style.
-Codechange: Add FOR_ALL_ACTIVE_CLIENT_INFOS macro that will loop all clients
 skipping inactive ones.
2006-10-18 13:17:46 +00:00
Darkvater e97d801d92 (svn r6816) -Codechange: Some coding style, variable localization, const correctness.
-Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
2006-10-17 23:34:12 +00:00
rubidium 28a0843707 (svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
The game date subsystem now allows someone to start in the year 0 and continue
up to the year 5 000 000. However, you currently cannot build anything before 
1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
2006-08-20 18:40:57 +00:00
Darkvater 7d232cf978 (svn r4267) - Fix (r4241): also validate the error number that a client receives from a server, and encapsulate this functionality into GetNetworkErrorMsg(). 2006-04-03 18:31:01 +00:00
Darkvater 42dec88a29 (svn r3726) - [6/6] Finalize conversion, finally save the patches struct.
- Remove the temporary synchronisation in during the map-transfer as this is no longer needed
- The saved patches work just like the saved gameoptions. You have a _patches and a _patches_newgame struct. The _patches_newgame struct contains the values from the configuration file and thus the defaults for new games. When a new game is started or an older game is loaded, the default values are copied over to _patches to be used. When you load a game that has PATS saved, the default values are also loaded, but immediately overwritten by the values from the savegame. This ensures that player-based values are always taken from your personal preferences.
- The current implementation also changes the default values if you change player-based settings in the game. For example changing window_snap_radius in a certain game will also change it for all next OpenTTD sessions.
- The savegame version has been increased to 22.
- The last 6 orso patches close the following reports:
  [ 1366446 ] different names for patches: all patch settings have the same name as in the configuration file and are reachable from the console.
  [ 1288024 ] Strange string on OTTD initial screen: configuration (and this includes patches) inputs are validated and clamped to their minimum/maximum values.
  [ 1423198 ] Make "Signals on Drive side" player, not server, based: this is only visual so current setting is to save it with the savegame but not synchronise in multiplayer.
  [ 1208070 ] Patches and New GRF options saved: apart from newgrf this is done
2006-03-02 02:22:15 +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
Darkvater a292621b14 (svn r3407) - Feature: Kick and ban now with IP numbers. 2006-01-19 15:58:57 +00:00
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 2005-10-07 07:35:15 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 3154e7148d (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 2005-06-24 12:38:35 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +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 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
tron 34f14e657d (svn r1970) Fix some warnings which Cygwin showed 2005-03-09 11:49:34 +00:00
darkvater eb3671b647 (svn r1945) - CodeChange: re-commit of rev 1835: "Reduce the visibility of network_core.h (Tron)".
- VS6/.NET: moved ENABLE_NETWORK to the project file setting (same place as WITH_SDL, WITH_ZLIB) and removed it from network_core.h
2005-03-06 16:23:32 +00:00
darkvater 8867c00d68 (svn r1845) - Revert r1835 since it totally screws network compiling
- Fix: fix some VS.NET warnings
- Add missing file to VS.NET project file
2005-02-07 19:45:08 +00:00
tron 7c38b7bc01 (svn r1835) Reduce the visibility of network_core.h 2005-02-07 09:54:37 +00:00
truelight 0470fe9f89 (svn r1691) -Fix: oops, forgot to bump the company-info-version 2005-01-26 19:51:29 +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
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
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
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 90b2b2144b (svn r1227) -Add: Ingame Server-list (select Internet, then Find Servers)
-Fix: UDPListener was launched wrongly
-Fix: Not all sockets have broadcast enabled anymore
-Fix: Server-advertise retries 3 times before giving up
2004-12-22 18:42:56 +00:00
truelight 19e3842615 (svn r1204) -Add: [Network] Added some cheaters-protection (money-cheat mostly) 2004-12-21 17:31:10 +00:00
truelight db16262698 (svn r1174) -Fix: [Network] All strings can now be translated (no more hardcoded strings) 2004-12-19 15:14:55 +00:00
truelight 0e19f74c16 (svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
and 'void' where needed, prefixed all functions, typedefs and global 
vars with 'Network' and organized all externals nicely.
2004-12-19 10:17:26 +00:00
truelight 015fb81810 (svn r1106) -Add: [Network] Added master-server protocol and advertise to
master-server option. No GUI yet, and disabled by default (it still is WIP)
2004-12-15 20:10:34 +00:00
truelight f80094deb7 (svn r1045) -Fix: OpenTTD compiles again under VC6 (sign_de) 2004-12-13 11:17:59 +00:00
truelight b8f6d41418 (svn r942) -Merged branch/network back into the trunk 2004-12-04 17:54:56 +00:00