1
0
Fork 0
Commit Graph

55 Commits

Author SHA1 Message Date
Tiger Wang 1a0d9450ea
Authentication flow: move construction, slim down classes (#5312)
- Remove extra members in ForgeHandshake
2021-10-02 21:27:32 +01:00
Ethan Jones 7b0872aecc
BungeeGuard style proxy security and OnlyAllowBungee config (#5291) 2021-09-23 21:09:52 +01:00
Feyo Korenhof 9ddc3635d6
Implemented cServer::ScheduleTask() and cServer::TickQueuedTasks() (#5224) 2021-05-26 18:07:32 +02:00
Tiger Wang 8a30a4a7b8 Player data loading cleanup
* Kick player if data were corrupt to avoid making it worse
2021-03-29 23:36:15 +01:00
Tiger Wang eeb63b8901
zlib -> libdeflate (#5085)
+ Use libdeflate
+ Use std::byte
* Fix passing temporary to string_view
+ Emulate make_unique_for_overwrite
2021-01-11 16:39:43 +00:00
Tiger Wang d9a7c51d4d ViewDistance: unsigned -> signed 2020-12-26 16:58:53 +00:00
Tiger Wang 090d8305e4 Warnings improvements
* Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality
* Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already
* Reduced GetStackValue verbosity
+ Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness
+ Give SettingsRepositoryInterface a move constructor to simplify main.cpp code
- Remove do {} while (false) construction in redstone handler
2020-12-18 21:03:40 +00:00
Tiger Wang 1bc12ba2b3 Streamline startup sequence
* Clean up cRoot & main
* Move some OS-specifics into OSSupport
2020-09-05 13:16:52 +01:00
peterbell10 13144a08e4
Enable some more clang-tidy linter checks (#4738)
* Avoid inefficient AString -> c_str() -> AString round trip

* Avoid redundant string init expressions

* Avoid unnecessary return, continue, etc.

* Add .clang-format to help with clang-tidy fix-its

* Avoid unnecessary passing by value

* Avoid unnecessary local copying

* Avoid copying in range-for loops

* Avoid over-complicated boolean expressions

* Some violations missed by my local clang-tidy

* Allow unnecessary continue statements

* Add brackets

* Another expression missed locally

* Move BindingsProcessor call into clang-tidy.sh and add space

* Fix pushd not found error

* Different grouping of CheckBlockInteractionRate
2020-05-14 22:15:35 +00:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Mat 6a21bf979c
Initial resource pack support (#4622) 2020-04-07 21:23:54 +00:00
peterbell10 84941bcc9f Update mbedtls to 2.5.1 (#3964)
* Renaming changes:
  * macro prefix "POLARSSL" -> "MBEDTLS"
  * functions now prefixed with "mbedtls_"
  * rename PolarSSL++ -> mbedTLS++
  * rename polarssl submodule

* Use mbedtls' AES-CFB8 implementation.

* Add cSslConfig to wrap mbedtls_ssl_config

* Update cTCPLink and cBlockingSslClientSocket to use cSslConfig

* Use cSslConfig in cHTTPServer

* Use cSslConfig for cMojangAPI::SecureRequest

* CI Fixes

* Set -fomit-frame-pointer on the right target
2017-08-30 15:00:06 +01:00
satoshinm 6bc5031517 Implement Forge protocol handshake support (#3869) 2017-08-27 23:10:20 +02:00
peterbell10 f4f2fc7c3d Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
Lukas Pioch 0397535fa7 Removed unused forward declarations (#3888) 2017-08-03 15:10:29 +02:00
Tiger Wang eb4432bb62 Tentative fix for player-limit race condition (#3862)
* Attempts to fix #2257

Derived from d233e9843148313c71fbaba96ccff660e47b07b1

* Changed player count type to int

* Clarified certain actions
2017-07-28 17:54:40 +01:00
peterbell10 a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01:00
mathiascode 8cf48f7682 Allow enabling/disabling of block change limit 2017-05-19 19:51:03 +02:00
sweetgiorni 25e4f15488 Custom Disconnect Message
Adds a m_ShutdownMessage option to the settings. When the stop command
is issued, players are kicked with said message before the server shuts
down.
2017-01-03 11:15:34 -08:00
Alexander Harkness a2a9341c24 Tab completion across worlds (#3270)
Fixes #2563.
2016-07-21 13:00:30 +02:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Lukas Pioch e1ba104359 Fixed race conditions 2016-01-17 20:11:37 +01:00
tycho b9efa02c80 Initial implementation of IniFile overloading 2015-05-16 10:46:51 +01:00
Mattes D 7dfeb67f01 Converted cServer to use the cNetwork API. 2015-01-27 14:53:31 +01:00
Mattes D 33c6ff872e Cosmetic touchups.
Removed trailing whitespace, added cast to remove warning, added file seeking in case of corrupt files.
2014-12-11 14:34:09 +01:00
Vincent 4b08ca261b Fixed indent problems and added return definitions to CheckMultiLogin().
Changed from IsAllowMultiLogin() to DoesAllowMultiLogin().
Fixed CheckMultiLogin() to not run to the end without returning a value.
2014-12-09 03:06:25 -08:00
Vincent 12c012fa01 Changed CheckMultiLogin() to not have main body wrapped in an if statement.
Added in indent to cPlayerListCallBack in cCallback class inside CheckMultiLogin().
Added doxy-comment for DoWithPlayer().
Changed comments on IsPlayerInQueue() and IsAllowMultiLogin() to doxy-comments.
2014-12-08 14:33:59 -08:00
Vincent 6de07d4a39 Fixed compile errors 2014-12-08 00:45:29 -08:00
Vincent a7bf2725c8 fixed naming of strings and changed from i to I 2014-11-29 11:22:03 -08:00
Vincent 61e761fdc2 issue 1253 - prevent multiple logins with same username 2014-11-29 00:36:15 -08:00
Mattes D 687752241f cMojangAPI: Don't update data if server is in offline mode. 2014-10-17 13:57:18 +02:00
madmaxoft 16e9deba8d Added an explicit setting for allowing BungeeCord handshake. 2014-09-17 20:56:33 +02:00
Mattes D 2218f31cde Exported cServer:ShouldAuthenticate to Lua API. 2014-08-20 22:21:41 +02:00
Howaner a5cca16abe Add "Broadcasting" settings to world.ini 2014-07-27 00:39:39 +02:00
madmaxoft 7fff12bfac Fixed spaces around single-line comments.
There should be at least two spaces in front and one space after //-style comments.
2014-07-17 19:13:23 +02:00
madmaxoft 993fd14ddf Fixed basic whitespace problems.
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-07-17 16:33:09 +02:00
Tiger Wang 1f6854792c Store properties as Json::Value 2014-07-16 00:03:47 +01:00
Tiger Wang 4e24f711ab Player properties are now retrieved 2014-07-14 19:49:31 +01:00
madmaxoft ebea2b7efc Player data filenames are based on UUID. 2014-07-11 13:13:10 +02:00
madmaxoft ec33bbe294 Moved cRsaPrivateKey to PolarSSL++, rewritten using existing objects. 2014-04-29 11:04:54 +02:00
jfhumann 4dd7610381 Declared one mutex as mutable in order to allow for const correct get accessors. 2014-04-19 17:53:02 +02:00
daniel0916 b506a74076 Added Yggdrasil Authentication System
Code by Howaner.  Fixes/Changes by me.
2014-04-13 13:04:56 +02:00
madmaxoft bc6fc859f4 Protocol 1.7: Forced encryption on all connections.
This is for testing purposes only, to find bugs in the encryption. Once the encryption is deemed stable, it will be enabled only for servers with enabled Authentication.
2014-01-28 23:53:54 +01:00
madmaxoft 5f34c78091 PolarSSL is fully used for 1.3.2 protocol encryption. 2014-01-23 23:35:23 +01:00
madmaxoft 3c0e8c8da0 Rewritten SocketThreads for proper shutdown scenario.
This fixes #560 and #390.
2014-01-19 19:31:43 +01:00
Tiger Wang e7fba08e6c Major refactoring of redstone
This commit is a refactoring of the redstone code, mainly the functions
handling the removal of invalid blocks from power supplier data
structures. Its aim is to improve performance and potentially reduce the
memory footprint of the data structures.

It works to reduce the amount of GetBlock()s triggered every tick.
Before, a GetBlock() was requested for every single item in the data
lists, as well as for every single redstone block in a chunk. Following
these changes, the AddBlock() event is utilised more effectively to only
update the lists when needed (a block is changed), as well as to insert
the block type (and update it when needed) alongside the coordinates
into the main redstone simulator chunkdata list.

In short, a single GetBlock() is now cached, with this cache being
updated when the simulator is awoken due to a block change.

At least, I *hope* that this is what it does :P
2014-01-10 20:31:05 +00:00
Tiger Wang 1d96a615b5 Fixed favicons 2014-01-07 16:53:40 +00:00
Bill Derouin 5012b81578 Avoid making copies of favicon string 2014-01-07 10:26:56 -06:00
Bill Derouin ede6757f67 A few touch ups 2014-01-07 09:40:59 -06:00
Bill Derouin 913841f501 Implement favicon for 1.7.2
Favicon data is a png encoded in base64 which is stored in the server
and sent in the server response packet
2014-01-07 09:31:06 -06:00