aboutsummaryrefslogtreecommitdiff
path: root/src/network/serverpackethandler.cpp
AgeCommit message (Collapse)Author
2020-09-07Inventory: Protect Craft and Drop actions (#10353)SmallJoker
Change dangerous pointer to unique_ptr for automated deletion.
2020-09-04Prevent interacting with items out of the hotbar (#10359)Lejo
2020-09-01[2] Code cleanup in serverpackethandler (#9349)HybridDog
* Code cleanup in serverpackethandler * do not define p_under unless a node is pointed * use switch-case and reduce indentation
2020-08-29Prevent players accessing inventories of other players (#10341)Lars Müller
2020-08-15Allow binding dig, place actions to keys; remove LMB/RMB hardcodingANAND
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
2020-06-13Exposing the zoom key to Lua API (#9903)Lars Müller
Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
2020-05-23Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)sorcerykid
Replace on_auth_fail callback with more versatile on_authplayer Better clarify account login process in Lua API documentation Change initial timestamp for newly registered accounts to -1
2020-05-16Log protocol ver on mismatched client connect toosfan5
2020-05-07Server class code cleanups (#9769)Loïc Blot
* Server::overrideDayNightRatio doesn't require to return bool There is no sense to sending null player, the caller should send a valid object * Server::init: make private & cleanup This function is always called before start() and loads some variables which can be loaded in constructor directly. Make it private and call it directly in start * Split Server inventory responsibility to a dedicated object This splits permit to found various historical issues: * duplicate lookups on player connection * sending inventory to non related player when a player connects * non friendly lookups on detached inventories ownership This reduce the detached inventory complexity and also increased the lookup performance in a quite interesting way for servers with thousands of inventories.
2020-05-05Server: Improve some log messages (#9820)sfan5
2020-04-25Add server side translations capability (#9733)EvidenceB Kidscode
* Add server side translations capability
2020-04-18serverpackethandler: Reduce pkt->getPeerId() invocations and more (#9689)HybridDog
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
2020-03-05Fixes around ServerActiveObject on_punch handlingsfan5
2019-11-10Call on_secondary_use when object is right-clickedsfan5
2019-09-23Fix broken buildsfan5
The variable name changed but this didn't cause merge conflicts, so it wasn't caught before.
2019-09-22Punchwear (improved) (#8959)sfan5
2019-09-21Wieldhand: Specify which ItemStack to use (#8961)SmallJoker
Makes 'get_wield_item' to return the "main" ItemStack
2019-09-19Remove incorrect MutexAutoLocksfan5
The line declared a variable "m_con" instead of locking m_con. getClient() doesn't need this anyway, so remove it.
2019-09-14Send ActiveObjects once right after Init2ANAND
2019-09-14Formspecs: Introduce formspec_version to modsSmallJoker
2019-09-09Send cumulated inventory changes only each step (#8856)SmallJoker
Applies to player and detached inventories
2019-08-24Inventory: Send dirty lists where appropriate (#8742)SmallJoker
This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code.
2019-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2019-08-07Client::Interact: Use InteractAction enum instead of numeric constantsANAND
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
2019-08-07Unify wield item handling (#8677)SmallJoker
This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client
2019-06-09Damage: Play no damage sound when immortal (#8350)SmallJoker
Add isImmortal server-side for proper enable_damage handling Rework log messages
2019-03-07Optimize interaction distance checker (#8193)Jozef Behran
The "what" parameter is being passed by value, most likely by accident as the type is "const std::string". Convert it to a reference by adding the missing "&".
2019-02-10Consistent HP and damage types (#8167)SmallJoker
Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter.
2019-01-06Fix various bugs (Anticheat, Lua helpers) (#8013)SmallJoker
* Fix various bugs (Anticheat, Lua helpers) Anticheat: Use camera position instead of player position for shoot line calculations Lua helpers: Increase 'i' to not overwrite earlier added table values * Remove lag compensation * * 1.5 for larger selection boxes
2018-12-04Send only changed node metadata to clients instead of whole mapblock (#5268)SmallJoker
Includes newer style changes and fixes by est31 Improve the block position de-serialization Add type NodeMetadataMap
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
2018-07-10Formspecs: Remove accidental empty 'quit' fieldSmallJoker
2018-06-26Rename CSM flavours to restrictionsSmallJoker
& Satisfy LINT
2018-06-13Server: move shutdown parts to a specific shutdown state object (#7437)Loïc Blot
* Server: move shutdown parts to a specific shutdown state object
2018-05-26Formspec verification: Fix show_formspec inside callbacks (#7374)SmallJoker
2018-03-28Add reasons to on_dieplayer and on_hpchangeAndrew Ward
2018-03-16Fix an alone if to be with a missing elseLoic Blot
2018-02-18Mitigate formspec exploits by verifying that the formspec was shown to the ↵red-001
user by the server. (#6878) This doesn't check the fields in anyway whatsoever so it should only be seen as a way to mitigate exploits, a last line of defense to make it harder to exploit bugs in mods, not as a reason to not do all the usually checks.
2018-02-15Add `on_auth_fail` callback (#7039)red-001
Called when a client fails to supply the correct password for the account it's attempting to login as.
2017-11-24Inventory: Restrict access from too far awaySmallJoker
2017-10-29Allow overriding tool capabilities through itemstack metadataraymoo
This makes it possible to modify the tool capabilities of individual itemstacks by calling a method on itemstack metadata references.
2017-10-16Fix strict_protocol_version_checking functionality after ee9a442SmallJoker
2017-09-27Add session_t typedef + remove unused functions (#6470)Loïc Blot
* Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
2017-09-26Implement mod communication channels (#6351)Loïc Blot
Implement network communication for channels * Implement ModChannel manager server side to route incoming messages from clients to other clients * Add signal handler switch on client & ModChannelMgr on client to handle channels * Add Lua API bindings + client packet sending + unittests * Implement server message sending * Add callback from received message handler to Lua API using registration method
2017-09-15ServerEnv: Clean up object lifecycle handling (#6414)sfan5
* ServerEnv: Clean up object lifecycle handling
2017-09-12Network: Fix logging into older worlds with base64 hashesSmallJoker
2017-09-12Network: Remove large parts of deprecated legacy code (#6404)SmallJoker
Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
2017-09-04Implement minetest.register_can_bypass_userlimit (#6369)Loïc Blot
* Implement minetest.register_on_userlimit_check This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP Only one mod needs to permit it. Move core part for builtin privileges checks to builtin
2017-08-29Network proto handlers/container fixes (#6334)Loïc Blot
* Fix HP transport + some double <-> float problems TOCLIENT_HP transport u16 hp as a u8, use u16 HP, this prevent HP over 255 to overflow across network * Fix more double/float problem in serverpackethandler & remove implicit struct type for TileAnimationParams * Fix connection unittests container