summaryrefslogtreecommitdiff
path: root/src/network
Commit message (Collapse)AuthorAge
* Add on_secondary_use when right clicking an item in the airAlex Ford2015-12-02
|
* 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.
* 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.
* Always use errorstream for DEBUG_EXCEPTION_HANDLERShadowNinja2015-10-14
|
* Use warningstream for log messages with WARNINGShadowNinja2015-10-14
| | | | Remove DTIME macro and its uses, too
* Fix how address is logged when a wrong password is suppliedKahrl2015-10-12
| | | | | | - SRP: print the address only once, not twice - Legacy: previously the address was not printed at all - Make both messages structurally the same, to facilitate log analyzers
* Remove redundant code in player interact handlerkwolekr2015-10-04
|
* Serialisation: documentation fixes, clarifying renames and whitespace fixesest312015-09-14
| | | | | | | | | | | | | | | 1. Do two renames: * SER_FMT_CLIENT_VER_LOWEST -> SER_FMT_VER_LOWEST_WRITE * SER_FMT_VER_LOWEST -> SER_FMT_VER_LOWEST_READ Now the two define values are consistently named with the _WRITE defines SER_FMT_VER_{HIGHEST,LOWEST}_WRITE, and to better point out what the two serialisation versions actually are for. 2. wrap some lines in doc/worldformat.txt, and point out that the node timers are serialized at a later point, as this can cause confusion about what now happens (if one doesn't strictly read the if block's conditions). 3. some whitespace fixes in NodeTimerList::serialize, and one new comment.
* networkprotocol.h: remove "u16 command" from docest312015-09-10
| | | | | | | Its obvious that "u16 command" is inside every packet, therefore this commit removes all mentions of the command, if non-array like notation is used. We already didn't add "u16 command" to new packets or removed it at packet changes, so now we remove it from existing packets.
* Hide minimap if it has been disabled by serverest312015-09-01
|
* Change i++ to ++iDavid Jones2015-08-25
|
* 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.
* Remove unused function from connection.{cpp,h}nerzhul2015-08-15
|
* Make NetworkPacket respect serialized string size limitskwolekr2015-08-10
|
* Fix BufferedPacket race condition (fixes #2983)kwolekr2015-08-06
| | | | | This was caused by the use the non-threadsafe SharedBuffer in a threaded context.
* Fix critical vulnerabilities and bugs with NetworkPacketkwolekr2015-08-06
|
* connection: Make assertions non-fatal for received datakwolekr2015-08-05
|
* src/network/connection.h: Fix race conditionBřetislav Štec2015-08-01
|
* Fix srp.cpp:815 leakest312015-07-27
| | | | Thanks @Zeno-
* Bump protocol to 26est312015-07-24
| | | | | | | This was needed due to the TileDef serialisation changes. Originally it has been planned to also add utf-8 based chat to 26, but chat changes aren't final yet, so they are done in one change, after the release, and not two small ones, causing us having to be compliant to three versions of the packet.
* 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.
* Ask auth handler to create auth when a default password is setest312015-07-21
| | | | | -> Fix server crash with protocol >=25 if a default password is set. -> Remove some useless and possibly confusion causing code for the TOCLIENT_FIRST_SRP packet handler
* Fix relief mapping issuesRealBadAngel2015-07-16
|
* connection.cpp: remove unused constructorLoic Blot2015-07-14
|
* Remove raw message output on AOM deserialization failurekwolekr2015-07-13
| | | | Improve TOCLIENT_ACTIVE_OBJECT_MESSAGES robustness for handling invalid data
* Fix damage flash when damage disabledkwolekr2015-07-10
|
* Use UTF-8 instead of narrowest312015-07-08
| | | | | Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places. Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
* Client: better m_proto_ver initialisationest312015-07-07
| | | | | | | | Previously, m_proto_ver was set to the serialisation version inside the legacy init packet. Now, if the server doesn't send a protocol version (protocols < 25), we set m_proto_ver to some value < 25 and > 0.
* Typo fix on previous @est31 commitLoic Blot2015-06-23
|
* Small TOCLIENT_HELLO logging fixest312015-06-23
| | | | | Fix grammar error and missing number conversion for version. Also add deployed protocol to log line.
* Use actionstream instead of errorstream when failing to emerge playerCraig Davison2015-06-23
|
* Generic CAO cleanups and renames for clarificationest312015-06-20
| | | | | | | | * Use enum for GENERIC_CMD_* * Rename m_attachements to attachement_parent_ids (public member and clearer name) * Rename GENERIC_CMD_SET_ATTACHMENT to GENERIC_CMD_ATTACH_TO * USHRT_MAX + 1 buffer sizes to prevent overflows as @kahrl suggested * Remove unneccessary m_id from GenericCAO (shadowing protected superclass member for no reason) as @kahrl suggested
* Deny empty username early in the protocolest312015-05-22
| | | | Thanks to @UltimateNate for pointing this out :)
* Replace instances of std::map<std::string, std::string> with StringMapkwolekr2015-05-19
| | | | | | Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
* Lower log level for unexpected behaviourest312015-05-19
| | | | | 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.
* Fix build since last commitest312015-05-16
| | | | Also rename method to better match what it does.
* Finalize init packets and enable protocol v25est312015-05-16
| | | | This enables srp.
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
| | | | | | | 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.
* Stop NetworkPacket methods from producing bloated packetsJay Arndt2015-05-05
|
* Protocol 25: wstring -> string for custom access denial reasonsest312015-04-22
| | | | Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
* Refactor around translatePasswordest312015-04-17
| | | | | | | 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.
* Make comments consistent with TOSERVER_INIT -> TOSERVER_INIT_LEGACY renameest312015-04-07
|
* TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD can be unreliable, catch PacketError ↵Loic Blot2015-04-05
| | | | | | exception. Also set the packet size at creation not when pushing rawString, no functional change
* Fix uninitialized variabled in ConnectionEventLoic Blot2015-04-05
|
* Remove errorstream logging on password changeest312015-04-03
| | | | This seems to be a debug message which has been forgotten to be removed.
* Create PacketError exception and use it with ACTIVEOBJECT_REMOVE_ADD handler ↵Loic Blot2015-04-03
| | | | which can be unreliable
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | 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
* NetworkPacket: reading outside packet is now clearer.Loic Blot2015-04-01
| | | | Use a common function to check the reading offset
* Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot2015-03-31
| | | | | | | 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
* RunCommandQueues: little optimizationLoic Blot2015-03-31
| | | | remove command from queue on success, else do nothing, instead of remove command from queue and push it front on success