summaryrefslogtreecommitdiff
path: root/src/server.cpp
Commit message (Collapse)AuthorAge
* Add clientside translations.Ekdohibs2017-08-24
|
* Network cleanup (#6302)Loïc Blot2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | * Cleanup network headers * Move peerhandler to a specific header to reduce compilation times * Move socket.cpp/h to network folder * More work * Network code cleanups * Move socket.{cpp,h} to network folder * Move Address object to network/address.{cpp,h} * Move network exceptions to network/networkexceptions.h * Client: use unique_ptr for Connection * Server/ClientIface: use shared_ptr for Connection * Format fixes * Remove socket.cpp socket.h from clang-format whitelist * Also fix NetworkPacket code style & make it under clang-format
* Respect object property hp_max field for players (#6287)SmallJoker2017-08-23
| | | | | | | | | | | * Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot2017-08-19
| | | | | | | | | | | * Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
* server.cpp: unroll setting when sending mapblocks (#6265)Loïc Blot2017-08-18
| | | | | | | | * server.cpp: unroll setting when sending mapblocks * Improve a little bit performance when sending mapblocks massively * Use a range based for * Code style fixes
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
| | | | * Cleanup various headers to reduce compilation times
* server.cpp: code modernizationLoic Blot2017-08-15
| | | | | | | * Use more for range based loops * Simplify some tests * Code style fixes * connection.h: better PeerChange constructor instead of creating uninitalized object and then affect variables
* Various server.cpp cleanupsLoic Blot2017-08-14
| | | | | | | * Modernize many for loops * Use constness on many loops * use empty function on many strings tests * various code style fixes
* Server::AsyncRunStep + Server::sendAddNode: modernize codeLoic Blot2017-08-14
| | | | | | | | * Use various modern for loops * Make some loop iterator constants, whereas there weren't * Use empty on some size() > 0 tests * Various little codestyle fixes * Fix an hidden scope variable in Server::SendBlockNoLock
* Remove one unused variable in Server::Receive functionLoic Blot2017-07-27
|
* [CSM] Add flavour limits controlled by server (#5930)Loïc Blot2017-07-18
| | | | | | | | | | | | | | | | | | | | * [CSM] Add flavour limits controlled by server Server send flavour limits to client permitting to disable or limit some Lua calls * Add limits for reading nodedefs and itemdefs * flavour: Add lookup node limits * Merge get_node_or_nil into get_node. Sending fake node doesn't make sense in CSM, just return nil if node is not available for any reason * Add node range customization when noderange flavour is enabled (default 8 nodes) * Limit nodes range & disable chat message sending by default * Bump protocol version
* Chat protocol rewrite (#5117)Loïc Blot2017-07-16
| | | | | | | | | | | | | * New TOCLIENT_CHAT_MESSAGE packet * Rename old packet to TOCLIENT_CHAT_MESSAGE_OLD for compat * Handle TOCLIENT_CHAT_MESSAGE new structure client side * Client chat queue should use a specific object * SendChatMessage: use the right packet depending on protocol version (not complete yet) * Add chatmessage(type) objects and handle them client side (partially) * Use ChatMessage instead of std::wstring server side * Update with timestamp support
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
|
* Remove legacy content_abm.{cpp,h}Loïc Blot2017-06-14
|
* Use thread_local instead from some static settings (#5955)Loïc Blot2017-06-11
| | | | | thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places. Add thread_local to undersampling calculation too.
* Sound: Add pitch option (#5960)Rui2017-06-11
| | | | * Sound: Add pitch option
* (Re)spawn players within 'mapgen_limit'paramat2017-06-11
| | | | | | | | | | | | | Previously, findSpawnPos() did not take the 'mapgen_limit' setting into account, a small limit often resulted in a spawn out in the void. Use the recently added 'calcMapgenEdges()' to get max spawn range through a new mapgenParams function 'getSpawnRangeMax()'. Previously, when a player respawned into a world, 'objectpos_over_limit()' was used as a check, which was inaccurate. Use the recently added 'saoPosOverLimit()' to get exact mapgen edges. Also fix default value of 'm_sao_limit_min'.
* Add a server-sided way to remove color codes from incoming chat messages (#5948)red-0012017-06-10
| | | | | | | | These code be generated by CSM, a modded client or just copy and pasted by the player. Changes - Update configuration example and setting translation file. - Remove colour codes before logging chat. - Add setting to remove colour codes before processing the chat.
* Fix sending color codes to clients that don't support them. (#5950)red-0012017-06-09
| | | Also remove `disable_escape_sequences` since it's not needed anymore.
* Have the server send the player list to the client (#5924)red-0012017-06-08
| | | | | * Have the server send the player list to the client Currently the client generates the player list based on the Client active object list, the issue with this is that we can't be sure all player active objects will be sent to the client, so this could result in players showing up when someone run `/status` but auto complete not working with their nick and CSM not being aware of the player
* Revert "Remove deprecated code segments (#5891)"Loïc Blot2017-06-06
| | | | This reverts commit 599e13e95e81aadb959c9f3715aec9b425ede084.
* Remove deprecated code segments (#5891)Thomas--S2017-06-04
|
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Real control fix (#5787)Loïc Blot2017-05-20
| | | | | | | | | | * Allow enabling and disabling mods. * Re-fix 605599b6f150b89ba6539c4d088231b326adcb48 This breaks some chars like € in chat. Instead verify is char is a non control char -> iswcntrl
* Mainmenu: Fix issues while trying to enable all mods (#5770)SmallJoker2017-05-19
|
* Particles: Do not send single particles to distant clients (#5760)Paramat2017-05-17
| | | | | | | Previously, every individual particle on a server is sent to, and rendered by (even if not actually visible), every client regardless of distance. This significantly reduces client FPS and creates unnecessary network traffic. Maximum distance is set by 'max block send distance' as this determines how far a client is able to see.
* Set sky API: Add bool for clouds in front of custom skyboxparamat2017-05-02
| | | | | | | Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
* Sound API: Add fading soundsBrandon2017-05-03
|
* Add clouds APIBen Deutsch2017-04-30
|
* Rename Scripting API files for consistencyShadowNinja2017-04-25
|
* Player data to Database (#5475)Loïc Blot2017-04-23
| | | | | | | | | | | | * Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty
* Add on_flood() callback.Auke Kok2017-04-22
| | | | | | | | | | | | | | | | | | | | | This callback is called if a liquid definitely floods a non-air node on the map. The callback arguments are (pos, oldnode, newnode) and can return a `bool` value indicating whether flooding the node should be cancelled (`return true` will prevent the node from flooding). Documentation is added, the callback function was tested with a modified minetest_game. Note that `return true` will likely cause the node's `on_flood()` callback to be called every second until the node gets removed, so care must be taken to prevent many callbacks from using this return value. The current default liquid update interval is 1.0 seconds, which isn't unmanageable. The larger aim of this patch is to remove the lava cooling ABM, which is a significant cost to idle servers that have lava on their map. This callback will be much more efficient.
* Fix #5617 - respect message and reconnect parameters when shutting down ↵orwell962017-04-21
| | | | immediately (#5621)
* Fix MSVC build broken by 34d32ceSmallJoker2017-04-17
| | | | | `round` -> `myround` Remove superflous `floor` calls
* Implement delayed server shutdown with cancelation (#4664)Loïc Blot2017-04-15
|
* ClientIface::sendToAll: honor packet configuration (#5590)Loïc Blot2017-04-14
|
* Move chat command handling code from C++ to Lua (#5528)red-0012017-04-08
|
* Fix multiple death messages (#5305)presstabstart2017-04-06
| | | | Fix multiple death messages (#3565) and damage server logs after death.
* Fix /shutdown or ^C no longer causing server exitsfan52017-03-19
| | | | Broken since b8484ef24e8e1ec90a2967372808ab2bea538c7c
* Update server min protocol version to v24 (#5411)Loïc Blot2017-03-19
| | | | | | | | | | * Update server min protocol version to v24 It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14 * Drop protocol v23 and lesser code
* Server list cleanupShadowNinja2017-03-18
| | | | This removes the hacky server_dedicated pseudo-setting.
* [CSM] storage + fixesLoic Blot2017-03-13
|
* [CSM] implement client side mod loading (#5123)Loïc Blot2017-03-13
| | | | | | | | | * client side mods are located in clientmods/ * move builtin/preview.lua to clientmods/preview/init.lua as a preview mod * refactor ModConfiguration class to work properly with client and server using child objects * move some Server constructor mod load code to ModConfiguration to reduce code duplication between client and server * remove mods.{cpp,h} unused functions * use UNORDERED_SET instead of std::set in some modspec storages
* [CSM] Client side moddingLoic Blot2017-03-13
| | | | | | | | | | * rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
* Add ModMetadata API (#5131)Loïc Blot2017-02-08
| | | | | | | * mod can create a ModMetadata object where store its values and retrieve it. * Modmetadata object can only be fetched at mod loading * Save when modified using same time as map interval or at server stop * add helper function to get mod storage path * ModMetadata has exactly same calls than all every other Metadata
* Block spam messages before calling on_chatmessage callbacks (#4805)rubenwardy2017-01-25
| | | Fixes #4799
* Fix potential crash in chat handling (since ↵sfan52017-01-22
| | | | 2f56a00d9eef82052614e5854a07b39b087efd0b)
* Add show_statusline_on_connect setting (#5084)Loïc Blot2017-01-21
| | | Add show_statusline_on_connect setting
* Revert "Detach the player from entities on death." (#5087)Loïc Blot2017-01-21
|