aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
AgeCommit message (Collapse)Author
2017-07-16Chat protocol rewrite (#5117)Loïc Blot
* 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
2017-06-18Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot
2017-06-14Remove legacy content_abm.{cpp,h}Loïc Blot
2017-06-11Use thread_local instead from some static settings (#5955)Loïc Blot
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.
2017-06-11Sound: Add pitch option (#5960)Rui
* Sound: Add pitch option
2017-06-11(Re)spawn players within 'mapgen_limit'paramat
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'.
2017-06-10Add a server-sided way to remove color codes from incoming chat messages (#5948)red-001
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.
2017-06-09Fix sending color codes to clients that don't support them. (#5950)red-001
Also remove `disable_escape_sequences` since it's not needed anymore.
2017-06-08Have the server send the player list to the client (#5924)red-001
* 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
2017-06-06Revert "Remove deprecated code segments (#5891)"Loïc Blot
This reverts commit 599e13e95e81aadb959c9f3715aec9b425ede084.
2017-06-04Remove deprecated code segments (#5891)Thomas--S
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-20Real control fix (#5787)Loïc Blot
* 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
2017-05-19Mainmenu: Fix issues while trying to enable all mods (#5770)SmallJoker
2017-05-17Particles: Do not send single particles to distant clients (#5760)Paramat
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.
2017-05-02Set sky API: Add bool for clouds in front of custom skyboxparamat
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).
2017-05-03Sound API: Add fading soundsBrandon
2017-04-30Add clouds APIBen Deutsch
2017-04-25Rename Scripting API files for consistencyShadowNinja
2017-04-23Player data to Database (#5475)Loïc Blot
* 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
2017-04-22Add on_flood() callback.Auke Kok
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.
2017-04-21Fix #5617 - respect message and reconnect parameters when shutting down ↵orwell96
immediately (#5621)
2017-04-17Fix MSVC build broken by 34d32ceSmallJoker
`round` -> `myround` Remove superflous `floor` calls
2017-04-15Implement delayed server shutdown with cancelation (#4664)Loïc Blot
2017-04-14ClientIface::sendToAll: honor packet configuration (#5590)Loïc Blot
2017-04-08Move chat command handling code from C++ to Lua (#5528)red-001
2017-04-06Fix multiple death messages (#5305)presstabstart
Fix multiple death messages (#3565) and damage server logs after death.
2017-03-19Fix /shutdown or ^C no longer causing server exitsfan5
Broken since b8484ef24e8e1ec90a2967372808ab2bea538c7c
2017-03-19Update server min protocol version to v24 (#5411)Loïc Blot
* 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
2017-03-18Server list cleanupShadowNinja
This removes the hacky server_dedicated pseudo-setting.
2017-03-13[CSM] storage + fixesLoic Blot
2017-03-13[CSM] implement client side mod loading (#5123)Loïc Blot
* 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
2017-03-13[CSM] Client side moddingLoic Blot
* 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
2017-02-08Add ModMetadata API (#5131)Loïc Blot
* 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
2017-01-25Block spam messages before calling on_chatmessage callbacks (#4805)rubenwardy
Fixes #4799
2017-01-22Fix potential crash in chat handling (since ↵sfan5
2f56a00d9eef82052614e5854a07b39b087efd0b)
2017-01-21Add show_statusline_on_connect setting (#5084)Loïc Blot
Add show_statusline_on_connect setting
2017-01-21Revert "Detach the player from entities on death." (#5087)Loïc Blot
2017-01-21Detach the player from entities on death. (#5077)red-001
2017-01-20Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)red-001
2017-01-18Add particle animation, glowsfan5
This is implemented by reusing and extending the TileAnimation code for the methods used by particles.
2017-01-17Remove client-side chat prediction. (#5055)red-001
Network lag isn't really a big issue with chat and chat prediction makes writing mods harder.
2017-01-15Added lua tracebacks to some errors where you have been blind to what… (#5043)sapier
* Added lua tracebacks to some errors where you have been blind to what actually went wrong
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
2017-01-01Breath cheat fix: server sideLoic Blot
Breath is now handled server side. Changing this behaviour required some modifications to core: * Ignore TOSERVER_BREATH package, marking it as obsolete * Clients doesn't send the breath to server anymore * Use PlayerSAO pointer instead of peer_id in Server::SendPlayerBreath to prevent a useless lookup (little perf gain) * drop a useless static_cast in emergePlayer
2016-12-26Various anticheat improvementssfan5
* Calculate maximum interact distance from wielded tool * New "interacted_while_dead" cheat_type for the Lua API * Disallow dropping items while dead * Move player to spawn before resurrecting them
2016-11-30Optimize/adjust blocks/ActiveObjects sent at the server based on client ↵lhofhansl
settings. (#4811) Optimize/adjust blocks and active blocks sent at the server based on client settings.
2016-11-28Allow restricting detached inventories to one playersfan5
This combats the problem of sending the hundreds of "creative" / "armor" or whatever detached invs that exist on popular servers to each and every player on join or on change of said invs.
2016-11-23Make supplying empty formspec strings close the formspec (#4737)orwell96
This will only happen if the formname matches or if formname is "".
2016-11-14Revert "Adding particle blend, glow and animation (#4705)"sfan5
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.