luanti-org/luanti

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

开放

#14,986 创建于 2024年8月16日

 (7 条评论) (2 个反应) (0 位负责人)C++ (2,395 个派生)auto 404
@ Client / AudiovisualsBugUI/UXgood first issue

仓库指标

星标
 (13,341 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南