summaryrefslogtreecommitdiff
path: root/src/server.h
Commit message (Collapse)AuthorAge
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
|
* Sound: Add pitch option (#5960)Rui2017-06-11
| | | | * Sound: Add pitch option
* 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.
* C++11 patchset 6: forbid object copy using assigment/copy function deleters ↵Loïc Blot2017-06-10
| | | | | | | (#5945) C++11 implement function deleting, it's generally used to prevent some object copy In script API use this function removal on ScriptApiBase instead of ScriptApiClient/Server/MainMenu, this affect all ScriptApis Move DISABLE_CLASS_COPY with constructor, the deleted function permit to replace function in its original place
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
| | | | * Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* 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
|
* 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
* Network:Remove old opcodes and fix documentation. (#5573)red-0012017-04-22
|
* Implement delayed server shutdown with cancelation (#4664)Loïc Blot2017-04-15
|
* Server list cleanupShadowNinja2017-03-18
| | | | This removes the hacky server_dedicated pseudo-setting.
* Add ModStorageAPI to client side modding (#5396)Loïc Blot2017-03-16
| | | mod storage is located into user_path / client / mod_storage
* [CSM] storage + fixesLoic Blot2017-03-13
|
* [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
* Implement player attribute backend (#4155)Loïc Blot2017-01-27
| | | | | | | | | | | | | | | * This backend permit mods to store extra players attributes to a common interface. * Add the obj:set_attribute(attr, value) Lua call * Add the obj:get_attribute(attr) Lua call Examples: * player:set_attribute("home:home", "10,25,-78") * player:get_attribute("default:mana") Attributes are saved as a json in the player file in extended_attributes key They are saved only if a modification on the attributes occurs and loaded when emergePlayer is called (they are attached to PlayerSAO).
* Add particle animation, glowsfan52017-01-18
| | | | | This is implemented by reusing and extending the TileAnimation code for the methods used by particles.
* Environment & IGameDef code refactoring (#4985)Ner'zhul2017-01-09
| | | | | | | | | | | | | | | | | | | | | * 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
* Move ServerEnvironment to dedicated cpp/header filesLoic Blot2017-01-08
| | | | * also cleanup some unneeded inclusions
* Breath cheat fix: server sideLoic Blot2017-01-01
| | | | | | | | | 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
* Move PP() and PP2() macros to basic_macros.hRogier2016-12-24
| | | | Instead of redefining them everywhere.
* Mod security: Allow read-only access to all mod pathsShadowNinja2016-12-20
|
* Allow restricting detached inventories to one playersfan52016-11-28
| | | | | | | 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.
* Revert "Adding particle blend, glow and animation (#4705)"sfan52016-11-14
| | | | This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
* Adding particle blend, glow and animation (#4705)Foghrye42016-11-15
|
* Add control information to player interacts (#4685)raymoo2016-11-12
|
* Add minetest.get_server_uptime() function to Lua API (#4702)Brandon2016-11-02
| | | Add minetest.get_server_uptime() function to Lua API
* Attached particle spawnersraymoo2016-10-13
|
* Move RemotePlayer code to its own cpp/headerLoic Blot2016-10-08
|
* RemotePlayer/LocalPlayer Player base class proper separation (code cleanup) ↵Loic Blot2016-10-08
| | | | | | | | | | | | (patch 3 of X) * remove IGameDef from Player class, only LocalPlayer has it now * move many attributes/functions only used by LocalPlayer from Player to LocalPlayer * move many attributes/functions only used by RemotePlayer from Player to RemotePlayer * make some functions const * hudGetHotbarSelectedImage now returns const ref * RemotePlayer getHotbarSelectedImage now returns const ref * various code style fixes
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)Loic Blot2016-10-08
| | | | | | | * Server/Client Environments now have an helper to cast Player object in the right type to use it * Server: use RemotePlayer everywhere and remove previous added casts * Client: use LocalPlayer where needed * Environment: remove unused functions (getPlayers(), getRandomConnectedPlayer(), getNearestConnectedPlayer())
* Remove some unused attributes/class functions in server.cpp/hLoic Blot2016-10-08
|
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)Loic Blot2016-10-08
| | | | | | | | | | | * LocalPlayer take ownership of maxHudId as it's the only caller * RemotePlayer take ownership of day night ratio as it's the only user * Pass getPlayerControl as const reference to prevent object copy on each call (perf improvement in ObjectRef::l_get_player_control call) * getPlayerSAO is now only RemotePlayer call * get/setHotbarItemCount is now RemotePlayer owned * Server: Use RemotePlayer instead of Player object on concerned call to properly fix the object type * PlayerSAO now uses RemotePlayer instead of Player because it's only server side * ObjectRef::getplayer also returns RemotePlayer as it's linked with PlayerSAO
* use unordered containers where possible (patch 4 on X)Loic Blot2016-10-06
| | | | Also remove some unused parameters/functions
* Chat: new settings to prevent spamLoic Blot2016-10-05
| | | | | | | | | | | Added the following chat coreside features * Chat messages length limit * Message rate limiting * Message rate kicking Note: * handleChat now takes RemotePlayer pointer instead of u16 to remove useless lookups
* Particles: Add option to remove particles on collisionAuke Kok2016-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | Adds the particle option `collision_removal = bool` Some particles are hard to use right now since they either go through solid blocks (without collision detection), and with collision detection enabled they (e.g. raindrops) would just stop dead on the floor and sit there until they expire, or worse, scrape along a wall or ceiling. We can solve the problem by adding a boolean flag that tells the particle to be removed if it ever collides with something. This will make it easier to add rain that doesn't fall through your roof or stick on the top of it. Or clouds and smoke that don't go through trees. Particles that collide with this flag are marked expired unconditionally, causing them to be treated like normal expired particles and cleaned up normally. Documentation is adjusted accordingly. An added bonus of this patch is that particles can potentially collide many times with nodes, and this reduces the amount of collisions to 1 (max), which may end up reducing particle load on the client.
* Handle particle spawners in env and delete expired idsobneq2016-04-28
| | | | Rebased by Zeno (2016-04-2016)
* Only allow players with shout to chatest312015-11-13
| | | | | | | | | | Fix regression of commit 5e507c9829942c434a6f1ae7a4f3a488c7e50bef "Add server side ncurses terminal" which allowed all players, even those without a shout priv, to chat. Fixes #3362.
* Put ChatEvent handler into own functionest312015-11-09
| | | | Comply with line limit.
* Add server side ncurses terminalest312015-11-06
| | | | | | | | | | | | | | | | | | | | | | | | This adds a chat console the server owner can use for administration or to talk with players. It runs in its own thread, which makes the user interface immune to the server's lag, behaving just like a client, except timeout. As it uses the same console code as the f10 console, things like nick completion or a scroll buffer basically come for free. The terminal itself is written in a general way so that adding a client version later on is just about implementing an interface. Fatal errors are printed after the console exists and the ncurses terminal buffer gets cleaned up with endwin(), so that the error still remains visible. The server owner can chose their username their entered text will have in chat and where players can send PMs to. Once the username is secured with a password to prevent anybody to take over the server, the owner can execute admin tasks over the console. This change includes a contribution by @kahrl who has improved ncurses library detection.
* Time: Remove serverside getter, and use atomic operationsest312015-11-03
| | | | | | | | It isn't possible to use atomic operations for floats, so don't use them there. Having a lock is good out of other reasons too, because this way the float time and the integer time both match, and can't get different values in a race, e.g. when two setTimeofDay() get executed simultaneously.
* Add callback parameter for core.emerge_area()kwolekr2015-11-02
|
* Add DISABLE_CLASS_COPY macro (and use it)kwolekr2015-10-27
| | | | | | | | | Use this macro to disallow copying of an object using the assignment operator or copy constructor. This catches otherwise silent-but-deadly mistakes such as "ServerMap map = env->getMap();" at compile time. If so desired, it is still possible to copy a class, but it now requires an explicit call to memcpy or std::copy.
* Environment: Time of day fixes and add serverside getterest312015-10-27
| | | | | | | | -> Put access to time variables under the time lock. -> Merge both time locks, there is no point to have two locks. -> Fix the lock being released too early in Environment::setTimeOfDay -> Add serverside getter so that you don't have to get the environment if you only have the server
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Cleanup server addparticle(spawner) by merge two identical functions.Loic Blot2015-07-25
|
* Fix documentation of dedicated_server_loopest312015-07-24
|
* Optional reconnect functionalityest312015-07-23
| | | | | | Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.