Skip to content
Snippets Groups Projects
  1. Oct 06, 2016
  2. Oct 05, 2016
    • Loïc Blot's avatar
      Chat: new settings to prevent spam · d4c76258
      Loïc Blot authored
      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
      d4c76258
  3. May 28, 2016
    • Auke Kok's avatar
      Particles: Add option to remove particles on collision · d499ec48
      Auke Kok authored
      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.
      d499ec48
  4. Apr 27, 2016
  5. Nov 13, 2015
  6. Nov 09, 2015
  7. Nov 06, 2015
    • est31's avatar
      Add server side ncurses terminal · 5e507c98
      est31 authored
      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.
      5e507c98
  8. Nov 03, 2015
  9. Oct 28, 2015
    • kwolekr's avatar
      Add DISABLE_CLASS_COPY macro (and use it) · c56d7fe0
      kwolekr authored
      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.
      c56d7fe0
  10. Oct 27, 2015
    • est31's avatar
      Environment: Time of day fixes and add serverside getter · ca8e56c1
      est31 authored
      -> 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
      ca8e56c1
  11. Aug 24, 2015
    • ShadowNinja's avatar
      Clean up threading · e4bff8be
      ShadowNinja authored
        * 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.
      e4bff8be
  12. Jul 25, 2015
  13. Jul 24, 2015
  14. Jul 23, 2015
    • est31's avatar
      Optional reconnect functionality · 3b50b276
      est31 authored
      Enable the server to request the client to reconnect.
      
      This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
      3b50b276
  15. Jul 10, 2015
  16. Jul 03, 2015
  17. May 28, 2015
    • TeTpaAka's avatar
      Add some missing getter functions to the lua API · c0335f7d
      TeTpaAka authored
      ObjectRef:
      get_properties
      get_armor_groups
      get_animation
      get_attach
      get_bone_position
      
      Players:
      get_physics_override
      hud_get_hotbar_itemcount
      hud_get_hotbar_image
      hud_get_hotbar_selected_image
      get_sky
      get_day_night_ratio
      get_local_animation
      get_eye_offset
      
      Global:
      minetest.get_gen_notify
      minetest.get_noiseparams
      c0335f7d
  18. May 17, 2015
  19. May 11, 2015
    • est31's avatar
      Make early protocol auth mechanism generic, and add SRP · 82e35edf
      est31 authored
      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.
      82e35edf
  20. Apr 22, 2015
  21. Apr 17, 2015
  22. Apr 03, 2015
  23. Mar 31, 2015
    • Loïc Blot's avatar
      Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>. · 1fe42564
      Loïc Blot authored
      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
      1fe42564
  24. Mar 24, 2015
    • Loïc Blot's avatar
      Don't send an InventoryAction at each setInventoryModified, we only need one... · 7851c4f7
      Loïc Blot authored
      Don't send an InventoryAction at each setInventoryModified, we only need one 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
      7851c4f7
  25. Mar 17, 2015
  26. Mar 16, 2015
  27. Mar 13, 2015
    • Loïc Blot's avatar
      Prepare Protocol v25 init & authentication. · 74d34da6
      Loïc Blot authored
      * 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
      74d34da6
    • Loïc Blot's avatar
      Rename some packet and handlers to <packet>_Legacy name for compat layer... · 126f36c2
      Loïc Blot authored
      Rename some packet and handlers to <packet>_Legacy name for compat layer between new network changes and old network clients
      126f36c2
  28. Mar 05, 2015
  29. Mar 04, 2015
  30. Mar 03, 2015
  31. Feb 16, 2015
    • Loïc Blot's avatar
      [Patch 2/4] Network rework: packet writing, sending and cleanups · ed04e8e9
      Loïc Blot authored
      NetworkPacket.cpp:
      * Remove some deprecated functions, we must use streaming interface
      * m_data converted from u8* to std::vector<u8>
      * Add an exporter to forge packet to Connection object
      * implement operator << std::wstring. n
      * implement operator << std::string
      * dynamic resize when write packet content.
      * fix string writing and performances.
      * create ServerCommandFactory, used by client to get useful informations about packet processing (sending).
        * Reliability
        * Transmit channel
      * Implement putRawString for some ugly char (_INIT packet), and use it.
      * Many packet read and write migrated
      * Implement oldForgePacket to interface writing with current connection
      * fix U8/char/bool writing
      * fix string writing and performances.
      * add some missing functions
      * Use v3s16 read instead of reading x,y,z separately
      * Add irr::video::SColor support into packets
      * Add some missing handlers
      * Add a template function to increase offset
      * Throw a serialization error on packet reading (must be improved)
      
      PacketFactories:
      * Create ServerCommandFactory, used by client to get useful informations about packet processing (sending).
      * Create ClientCommandFactory, used by server to get useful informations about packet processing (sending).
      
      Client.cpp:
      * implement NetworkPacket ::Send interface.
      * Move packet handlers to a dedicated file
      * Remove Client::Send(SharedBuffer)
      
      Server.cpp:
      * implement NetworkPacket ::Send interface.
      * Rewrite all packets using NetworkPacket
      * Move packet handlers to a dedicated file
      * Remove Server::Send(SharedBuffer)
      
      ClientIface.cpp:
      * Remove sendToAll(SharedBuffer<u8>)
      
      Connection.hpp rework:
      * Remove duplicate include
      * Remove duplicate negation
      * Remove a useless variable
      * Improve code performance by using a m_peers_list instead of scanning m_peers map
      * Remove Connection::Send(SharedBuffer)
      * Fix useafterfree into NetworkPacket Sending
      * Remove unused Connection::sendToAll
      
      Test.cpp:
      * Remove dead code
      * Update tests to use NetworkPackets
      
      Misc:
      * add new wrappers to Send packets in client, using NetworkPacket
      * Add NetworkPacket methods for Connection
      * coding style fix
      * dead code since changes cleanup
      * Use v3s16 read instead of reading x,y,z separately in some packets
      * Use different files to handle packets received by client and server
      * Cleanup: Remove useless includes
      
      ok @Zeno-
      Tested by @Zeno- @VanessaE and @nerzhul on running servers
      ed04e8e9
  32. Feb 10, 2015
    • Loïc Blot's avatar
      Network Layer 7 rework (Packet handling) · a704c04f
      Loïc Blot authored
      * Move networkcode to a dedicated directory
      * Rename clientserver.h to network/networkprotocol.h (Better name) and sanitize some includes
      * Create object NetworkPacket
        * It stores command (opcode) and data separated
        * It also stores peer_id
        * Data reading can be done by using a streaming interface
      * Change packet routing analysis
        * Remove old conditional analysis
        * Now uses function pointed analysis and add connection state ({Client,Server}::handlers)
        * Connection state permit to categorize condition to handle before analyze packets
        * Create a handler for depreciated messages, instead of duplicating code
      a704c04f
Loading