1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00
Commit Graph

141 Commits

Author SHA1 Message Date
Michał Janiszewski
18d656e012 Ensure player names are unique
Do this by cheating a little: create a map with count of clients using
given username and increment it each time such a username is
encountered. This yields very similar results to actually counting users
holding given name, but saves all the error-prone string parsing.
2016-05-27 20:28:34 +02:00
LRFLEW
5d5c10f99f Fixed OS X Build 2016-05-27 20:28:33 +02:00
Michał Janiszewski
4ffceafdbb Make sure the challenge token is random and handled properly
This change also fixes passworded servers not working properly, as
strlen() was getting called on something that was not guaranteed to be
null-terminated string when signing the token.
2016-05-27 20:28:33 +02:00
Michał Janiszewski
66abc31fee Handle malformed private keys gracefully 2016-05-27 20:28:33 +02:00
Michał Janiszewski
553e1bdf0f Minor fixes to authorisation system 2016-05-27 20:28:33 +02:00
Michał Janiszewski
caa74acb1b Fixes for x86-64 2016-05-27 20:28:33 +02:00
Michał Janiszewski
715ba561b1 Initial version of key-based auth 2016-05-27 20:28:33 +02:00
Michał Janiszewski
1c459c8186 Add NetworkKey class 2016-05-27 20:28:33 +02:00
Michał Janiszewski
40253a7add Prevent SIGPIPE-ing on Linux when clients drop (#3755)
`send()` can only write to connected sockets [1]. In case where client
drops out, a socket may become closed by OS but we can still enqueue
packets for its connection and eventually call `send()`, which will
generate a SIGPIPE and shut the server down, because there was no
`MSG_NOSIGNAL` set.

This commit makes sure `MSG_NOSIGNAL` is used on Linux.

[1] http://linux.die.net/man/2/send
2016-05-27 17:44:23 +01:00
CraigCraig
3f9afb9744 Various Spellchecks (#3741) 2016-05-26 09:49:19 +02:00
Michał Janiszewski
5e8867175b Fix crash on malformed permission name 2016-05-21 17:33:57 +02:00
Michał Janiszewski
8066ed6ecc Format to break long lines in network.cpp
[ci skip]
2016-05-21 17:33:50 +02:00
Michał Janiszewski
bf24f5eef8 Use human-readable names for storing permissions 2016-05-21 16:23:20 +02:00
Michał Janiszewski
9d90a88461 Store groups as json 2016-05-21 14:54:00 +02:00
janisozaur
ca430e1b23 Drop unused variables (#3586) 2016-05-13 18:21:58 +01:00
janisozaur
68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Ted John
0f6e64ac76 add global macros for map size and tile loop 2016-04-24 14:00:26 +01:00
Ted John
a1150d31cf add global macros for more scenario variables 2016-04-23 18:07:07 +01:00
Ted John
1950fad315 add global macros for date 2016-04-23 11:03:34 +01:00
Ted John
467513616d add global macro: gCurrentTicks 2016-04-23 02:49:24 +01:00
Ted John
11a2ba0133 add global macro: gCashEncrypted 2016-04-23 01:58:54 +01:00
Ted John
b4b3dc7dbe add global macro: gParkValue 2016-04-23 01:50:12 +01:00
Ted John
b59f5c17ca add global macros for park...
- gParkSize
- gParkEntranceFee
- gNumGuestsInPark
2016-04-23 01:00:00 +01:00
Ted John
307cb9e08b add global macro: gParkFlags 2016-04-23 00:51:22 +01:00
zsilencer
3ba7d54247 Fix reconnect issue caused by inboundpacket not being cleared 2016-04-20 01:49:16 -06:00
zsilencer
0ceff7fd90 More efficient map transfers 2016-04-20 01:49:15 -06:00
zsilencer
e582a8f47f Stop constantly resizing vector 2016-04-20 01:49:15 -06:00
zsilencer
b257e431d9 Get rid of using user_strings for interface 2016-04-20 01:49:15 -06:00
Michał Janiszewski
b2a3b82d08 Show network version to client if mismatched
This will let players know which version should they be using to connect
to server. Also prevents users from even trying to join servers running
versions we already know are incompatible.
2016-04-19 21:15:23 +02:00
janisozaur
24eaa0a56d Show units used when streaming the map over network. Fix #3328 (#3331) 2016-04-17 21:27:23 +01:00
Ted John
1b3f46f960 integrate game command error string variables
- gGameCommandErrorTitle
- gGameCommandErrorText
2016-04-15 17:54:46 +01:00
wolfreak99
1947b1dd30 require special permission for cluster building, closes #3045 2016-04-10 11:52:34 +01:00
IntelOrca
74d96d86c0 fix #3158: close network status window doesn't abort 2016-03-22 23:27:49 +00:00
zsilencer
66e406ab75 Fix #3048: Remove format codes in player names and chat 2016-02-29 21:33:46 -07:00
IntelOrca
e57f27e1a1 improve group renaming 2016-02-29 22:34:37 +00:00
IntelOrca
db3c69c237 fix #3025: Wrong localisation of server messages 2016-02-27 13:12:04 +00:00
Michał Janiszewski
aa8437cb9d Minor fixes 2016-02-26 20:49:01 +01:00
Michał Janiszewski
e232358608 Display message with chat shortcut keys upon connection
Works for server as well.
2016-02-26 10:26:30 +01:00
Martin Černáč
830b897dc6 Refactor conditional buffers and string_ids 2016-02-19 17:17:10 +01:00
Martin Černáč
62672af35e Refactor sprintf and string_formater usages 2016-02-18 17:43:47 +01:00
Martin Černáč
361d30c6f5 Fix #2802 - extract hardcoded network-related strings
I extracted all of the hardcoded network-related strings. In addition to that, I also refactored the way last_disconnect_reason was being accessed/modified.
2016-02-18 14:52:02 +01:00
IntelOrca
b11afac5c8 potential fix or improvement to #2924: ride sync
- Do not delete rides when sending map to clients.
- Only do track related checks for track, not flat rides
2016-02-15 22:01:29 +00:00
Michał Janiszewski
a09afd0be5 Minor fixes
* Be more cautious while doing pathfinding
* Be a little more deterministic on network by initialising all member
  fields.
2016-02-14 22:22:38 +01:00
zsilencer
c789449ea8 Change log_warning to log_verbose 2016-02-02 14:47:51 -07:00
zsilencer
41a52065fa Fix #2845: Remove file size limit on map send 2016-02-02 14:11:19 -07:00
zsilencer
b2083deed0 implement cheats over multiplayer 2016-02-02 14:08:59 -07:00
Martin Černáč
5d69eda3da Fix segfault when loading network game with unknown objects
This oneliner causes the game not to crash, when connecting to a network game that utilizes objects, that the connecting client doesn't have installed. Instead, it quits to the main menu with an error message being displayed.
2016-02-02 14:27:08 +01:00
Michał Janiszewski
eeac901b11 Don't prematurely fail network resolver
Sometimes the resolver is still in progress while an update checks its
status, which is `INPROGRESS` and makes the game think there was a
connection failure.

This lets resolver continue doing its job if the status is `INPROGRESS`.
2016-02-01 23:44:48 +01:00
Michał Janiszewski
e814cdd271 Decouple network version from OpenRCT2 version
This allows to present a different version of network stream than just
OpenRCT2 version, as we can possibly have breaking changes to network in
one release cycle.

This commit also adds easy way of identification which hosts are running
which versions, by showing a tooltip when hovering mouse cursor over the
network compatibility icon. Client's own version is displayed as well.
2016-01-30 22:44:43 +01:00
LRFLEW
095e0e18e3 Fix unsigned warning in network_set_player_last_action_coord 2016-01-27 16:00:00 -07:00