aboutsummaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2015-05-22Deny empty username early in the protocolest31
Thanks to @UltimateNate for pointing this out :)
2015-05-19Replace instances of std::map<std::string, std::string> with StringMapkwolekr
Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
2015-05-19Lower log level for unexpected behaviourest31
Its a possible mistake to log in to a server with twice the same name. Before, it triggered a server wide error message, now it logs to actionstream.
2015-05-16Fix build since last commitest31
Also rename method to better match what it does.
2015-05-16Finalize init packets and enable protocol v25est31
This enables srp.
2015-05-11Make early protocol auth mechanism generic, and add SRPest31
Adds everything needed for SRP (and everything works too), but still deactivated, as protocol v25 init packets aren't final yet. Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25 inside networkprotocol.h.
2015-05-05Stop NetworkPacket methods from producing bloated packetsJay Arndt
2015-04-22Protocol 25: wstring -> string for custom access denial reasonsest31
Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
2015-04-17Refactor around translatePasswordest31
Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
2015-04-07Make comments consistent with TOSERVER_INIT -> TOSERVER_INIT_LEGACY renameest31
2015-04-05TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD can be unreliable, catch PacketError ↵Loic Blot
exception. Also set the packet size at creation not when pushing rawString, no functional change
2015-04-05Fix uninitialized variabled in ConnectionEventLoic Blot
2015-04-03Remove errorstream logging on password changeest31
This seems to be a debug message which has been forgotten to be removed.
2015-04-03Create PacketError exception and use it with ACTIVEOBJECT_REMOVE_ADD handler ↵Loic Blot
which can be unreliable
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-04-01NetworkPacket: reading outside packet is now clearer.Loic Blot
Use a common function to check the reading offset
2015-03-31Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot
Because we get a Buffer<u8> from ConnectionEvent, don't convert it to SharedBuffer<u8> and return it to Server/Client::Receive which will convert it to NetworkPacket Instead, put the Buffer<u8> directly to NetworkPacket and return it to packet processing This remove a long existing memory copy Also check the packet size directly into Connection::Receive instead of packet processing
2015-03-31RunCommandQueues: little optimizationLoic Blot
remove command from queue on success, else do nothing, instead of remove command from queue and push it front on success
2015-03-31Typo in getOutgoingSequenceNumber => successfull to successfulLoic Blot
2015-03-30Use Buffer not SharedBuffer in NetworkPacket::oldForgePacketLoic Blot
2015-03-29queued_commands must be a std::deque. RunCommandQueues needs to push packet ↵Loic Blot
on front, not back
2015-03-27Change error_message from wstring to stringShadowNinja
This removes a lot of narrow/wide conversions where a wide string was never used.
2015-03-27Clean up and tweak build systemShadowNinja
* Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
2015-03-24Don't send an InventoryAction at each setInventoryModified, we only need one ↵Loic Blot
SendInventory per inventory modification Client doesn't like to receive multiples SendInventory for one action, this can trigger glitches on clients (sometimes due to incorrect UDP packet ordering due to UDP protocol) This fix issue #2544
2015-03-22Remove unused ConnectionCommand::sendToAll function. ↵Loic Blot
NetworkPacket::oldForgePacket returns Buffer instead of SharedBuffer and is used in ConnectionCommand instead of Connection::Send This remove the NetworkPacket buffer => SharedBuffer => Buffer copy. Now NetworkPacket => Buffer
2015-03-21SendInventory when handleCommand_Interact is a use.poet-nohit
This call was missing when change looping to triggering SendInventory: 1b2f64473ed4f222d3b7f02df853730d4382105e
2015-03-18ServerpacketHandler: spelling fixesLoic Blot
2015-03-17Use the NetworkPacket api to read full version string instead of u8 ↵Loic Blot
pointers. Also store the reserved byte to use API properly Fixes #2509
2015-03-16Rename packethandler/{client,server}.cpp to {client,server}packethandler.cppLoic Blot
* Requested by @Zeno- * Approved by @nerzhul
2015-03-16If player is dead, permit it to respawn, even if damages are not enabledLoic Blot
* Mods can do setHP function to do damages and override the enable_damage value sometimes
2015-03-13Replace NetworkPacket pointers to referencesLoic Blot
2015-03-13Prepare Protocol v25 init & authentication.Loic Blot
* TOSERVER_INIT and TOCLIENT_INIT renamed to _LEGACY * TOSERVER_PASSWORD merged from dev-0.5, can use protocol v24 and v25 * TOCLIENT_ACCESS_DENIED merged from dev-0.5, can use protocol v24 and v25, with normalized strings an a custom id for custom errors * new TOSERVER_INIT packet only send MT version, supported compressions, protocols and serialization, this permit to rework everything later without break the _INIT packet * new TOSERVER_AUTH packet which auth the client * new TOCLIENT_HELLO packet which send server serialization version atm * new TOCLIENT_AUTH_ACCEPTED which is send when TOCLIENT_AUTH was okay. After this packet, the client load datas from servers, like after TOCLIENT_INIT_LEGACY packet
2015-03-13Handle the newly added TOCLIENT_ACCESS_DENIED and ↵Loic Blot
TOCLIENT_DELETE_PARTICLESPAWNER * Rename the handlers from _Legacy to regular, because here we can use same handlers * Fix some packet names and pseudo handlers
2015-03-13Rename some packet and handlers to <packet>_Legacy name for compat layer ↵Loic Blot
between new network changes and old network clients
2015-03-13Use the new Player::isDead function when it's the caseLoic Blot
2015-03-12handleCommand_Breath mustn't update breath is player is dead. A dead player ↵Loic Blot
doesn't breath. Add Player::isDead function to check player is dead
2015-03-12Don't handle PlayerPos packet coming from client if player is deadLoic Blot
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-06Clean up database API and save the local map on an intervalShadowNinja
2015-03-05Server.cpp Use std::list instead of std::vector for playSound, ↵Loic Blot
fillMediaCache, sendRequestedMedia, sendMediaAnnouncement and related functions
2015-03-05Remove Queue class which uses std::list and use native std::queueLoic Blot
2015-03-04ClientInterface::getClientIDs doesn't need a std::list. Use a std::vector ↵Loic Blot
for better perfs
2015-03-04We always know playerSAO when calling SendInventory. Using it instead of ↵Loic Blot
searching it via peer_id
2015-03-04Send Position packet on event, don't check it at each AsyncRunStep.Loic Blot
* This permit to cleanup the player checking loop
2015-03-04Send Inventory packet on event, don't check it at each AsyncRunStep.Loic Blot
* Call UpdateCrafting into SendInventory because this functions is only called before SendInventory * Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id * m_env_mutex don't need to be used with this modification because it's already locked before the calls
2015-03-03Send Breath packet on event, don't check it at each AsyncRunStepLoic Blot
2015-03-03Send Player HP when setHP (or a setHP caller) is called instead of looping ↵Loic Blot
and testing the state change.
2015-02-23Fix wrapDegrees family of functionsCraig Robbins
wrapDegrees() (renamed to modulo360f) wrapDegrees_0_360 wrapDegrees_180 Minor errors were present in previous versions; see issue #2328
2015-02-21Fix some memory leaks on packet sending.Loic Blot
2015-02-21Move sha1.hpp and base64.hpp to util/Loic Blot