luanti-org/luanti

`minetest.disconnect_player` frames reason text as an error message

Aperta

#14.986 aperta il 16 ago 2024

 (7 commenti) (2 reazioni) (0 assegnatari)C++ (2395 fork)auto 404
@ Client / AudiovisualsBugUI/UXgood first issue

Metriche repository

Star
 (13.341 stelle)
Metriche merge PR
 (Merge medio 13g 22h) (48 PR mergiate in 30 g)

Descrizione

Minetest version

5.9.0

Summary

If you get disconnected via minetest.disconnect_player(player, "Some reason text."), Minetest disconnects you but the message is framed as an error message. It looks something like this:

"An error has occured: Access denied. Reason: Some reason text.".

I think this is wrong; the message should not be framed as an error but as a generic message. Specifically, the "An error has occured:" must go.

This is because disconnecting a player like this is normal and not done because there's an error or bug in the software.

Steps to reproduce

  1. Install luacmd
  2. Do the command: /lua minetest.disconnect_player(me, "This is the disconnect reason text.")

Guida contributor