Commit Graph

32 Commits

Author SHA1 Message Date
rubenwardy d5c162fb03
Add luacheck to check builtin (#7895) 2022-05-21 16:17:08 +02:00
nOOb3167 4f676807e2
Make os.tempfolder work correctly for MinGW & MSVC (#7443) 2022-05-21 16:16:04 +02:00
nOOb3167 738d5dfd3b
Fix builtin lua function os.tempfolder (#7368)
* Fix builtin lua function os.tempfolder
2022-05-21 16:16:01 +02:00
rubenwardy b744f1d46f
Add online content repository
Replaces mods and texture pack tabs with a single content tab
2022-05-21 16:15:57 +02:00
sfan5 10fbc96971
Fix core.wrap_text and make its behaviour consistent with the docs
Code based on initial implementation by @dsohler.
2022-05-21 16:15:19 +02:00
SmallJoker 7b4120ee9f
CSM: Document forgotten functions 2022-05-21 16:14:47 +02:00
ShadowNinja 5030ce5f4b
Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2022-05-21 16:14:45 +02:00
Jean-Patrick Guerrero b62c15b4b1
Multiplayer menu: fix attempt to open nonexistant image
Since local servers and local favorites have no ping value (these
are only provided by the server) we shouldn't load a broken
image filename.

Fixes #5238
2022-05-21 16:14:22 +02:00
Jean-Patrick Guerrero 464935baec
Serverlist: Add ping indicators (#5164) 2022-05-21 16:14:19 +02:00
red-001 1b7a21e322
Add keyword based search to serverlist 2022-05-21 16:14:13 +02:00
est31 6213fb1cf6
Client: disable pre v25 init sending by default
Disable the ability to connect to old servers by default to
improve password security.

If people still want to connect to old (0.4.12 and earlier)
servers, they can flip the send_pre_v25_init setting.

Add the ability to detect if we've tried to connect
to a server which only supports the pre v25 init protocol,
and show an apropriate error message. Most times the error
will already be catched at the serverlist level, the
detection mechanism only acts as last resort, because the
"Connection timed out" error message that would be shown
otherwise would be very confusing.

Automatic "fixing" of this condition is not desired,
as it would allow for downgrade attacks.

As already 161 of the 167 servers on the serverlist
support the new srp based auth protocol (> 96%),
the breakage should be minimal.

Follow up of commit

af30183124d40a969040d7de4b3a487feec466e4 "Add option to not send pre v25 init packet"

Also change the pessimistic assumption of masterlist
server versions to optimistic, in order to avoid buggy
behaviour (favourites not in the serverlist would be
denied to connect to, etc).
2022-05-21 16:13:48 +02:00
Nathanaël Courant d39cdbcf4f
Fix mainmenu code downloading the public serverlist twice.
Also, fix a nil error that can happen sometimes in
menu_handle_key_up_down
2022-05-21 16:13:34 +02:00
Jean-Patrick Guerrero ee08952a2e
Mainmenu: Code cleaning 2022-05-21 16:13:33 +02:00
Jean-Patrick Guerrero 24d09852ee
Mainmenu: Unify favorite servers with main serverlist 2022-05-21 16:13:33 +02:00
est31 f762820a7e
Mainmenu: Still support favorites if send_pre_v25_init is disabled
@SmallJoker has noted a bug that servers from the (local) main menu
favorites list can't be opened.

This commit fixes the bug by disabling any main menu based protocol
checks for servers from the favorite list.

Also, it fixes a second bug that happens when a server from the
public serverlist doesn't send its supported protocol versions,
most likely because its running a minetest older than commit [1].
Then we have shown an error msg that the server has enforced
one specific protocol version. This was most likely not the case.

Of course, we can't do anything better than do an assumption on
the protocol versions if they are not known. That assumption
should however be closest to the most often occuring case as
possible.

Also, some little cleanups.

[1]: 5a0ed780f56a5225b3d7c5f64099586e390e5f39 "Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist"
2022-05-21 16:13:32 +02:00
SmallJoker f4ed603ee0
mainmenu: Tidy up logic in is_server_protocol_compat() (#3997)
Apply de morgan to simplify the logic.
2022-05-21 16:13:31 +02:00
est31 eaab9d5586
Add option to not send pre v25 init packet
The legacy init packet (pre v25) sends information about the client's
password that a server could use to log in to other servers if the
username and password are the same. All the other benefits of SRP of
protocol v25 are missed if the legacy init packet is still sent during
connection creation.

This patch adds an option to not send the v25 init packet. Not sending
the v25 packet means breaking compat with pre v25 servers, but as the
option is not enabled by default, no servers are affected unless the
user explicitly flips the switch. More than 90% of the servers on the
serverlist support post v25 protocols.

The patch also fixes a bug with greying out of non compliant servers
being done wrongly, the min and max params were mixed.
2022-05-21 16:13:26 +02:00
Rui914 32752d2bc5
Faster insertion into table 2022-05-21 16:13:23 +02:00
est31 bd43e63b83
Better gettext support for protocol version mismatch messages
Previously, xgettext failed to resolve the dynamic call.
Thanks to @JakubVanek for pointing this out.
2022-05-21 16:12:56 +02:00
est31 e21528442c
Don't do formspec escaping twice for loading description 2022-05-21 16:12:47 +02:00
Sokomine afdd384f40
Set server_announce to world.mt and respect modes when changing subgame 2022-05-21 16:12:40 +02:00
Sokomine 7345adbbb5
Fix world.mt not written when selecting mode 2022-05-21 16:12:39 +02:00
est31 06cedfb052
Fix single click world select 2022-05-21 16:12:39 +02:00
Jean-Patrick Guerrero 2c8a161000
Fix bugs in mainmenu 2022-05-21 16:12:38 +02:00
HybridDog c1853e2893
More reliable serverlist behaviour
-> remember the previously loaded serverlist, and use if new one failed
-> show a "loading" serverlist
2022-05-21 16:12:35 +02:00
Loïc Blot afa56e9c91
Remove duplicate code since 8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a 2022-05-21 16:12:28 +02:00
fz72 3f6d3e066a
Save creative_mode and enable_damage setting for each world in world.mt
Create Parameters on world initialisation and set settings of old worlds
2022-05-21 16:12:28 +02:00
est31 5a662882bf
Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist
Client now informs about incompatible servers from the list, this permits to prevent the protocol movements.
Server announces its supported protocol versions to master server
2022-05-21 16:12:25 +02:00
sapier 4bf651e1b8
Fix forgotten favourite list image update of simple menu 2022-05-21 16:12:13 +02:00
Kahrl 5ee1b776ba
Ignore downloaded public serverlist if public_serverlist is false
Fixes #1807: When the server list finishes downloading, the local server
list resets in certain conditions
2022-05-21 16:12:11 +02:00
Kahrl 96b6aa6e4b
Display serverlist flags as icons 2022-05-21 16:12:09 +02:00
sapier c2df20263f
Add formspec toolkit and refactor mainmenu to use it Fix crash on using cursor keys in client menu without selected server Add support for non fixed size tabviews 2022-05-21 16:11:42 +02:00