luanti-org/luanti

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

Open

#14,986 opened on Aug 16, 2024

View on GitHub
 (7 comments) (2 reactions) (0 assignees)C++ (2,395 forks)auto 404
@ Client / AudiovisualsBugUI/UXgood first issue

Repository metrics

Stars
 (13,341 stars)
PR merge metrics
 (PR metrics pending)

Description

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.")

Contributor guide