summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2019-11-05 19:24:51 +0100
committerGitHub <noreply@github.com>2019-11-05 19:24:51 +0100
commit15a030ec9f5d9016c287cf3964894683121e59fd (patch)
treee9133a2fd02176575992f772221d88a0c9a8995f /builtin
parent2907c0f3a2953601aa1a81ff8226ff60086fb41b (diff)
downloadminetest-15a030ec9f5d9016c287cf3964894683121e59fd.tar.gz
minetest-15a030ec9f5d9016c287cf3964894683121e59fd.tar.bz2
minetest-15a030ec9f5d9016c287cf3964894683121e59fd.zip
Improve documentation around banning (#9088)
* Fix ban chatcommand description * Correct ban API documentation
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/chat.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua
index 424cbfe3f..37d12c458 100644
--- a/builtin/game/chat.lua
+++ b/builtin/game/chat.lua
@@ -909,8 +909,8 @@ core.register_chatcommand("shutdown", {
})
core.register_chatcommand("ban", {
- params = "[<name> | <IP_address>]",
- description = "Ban player or show ban list",
+ params = "[<name>]",
+ description = "Ban the IP of a player or show the ban list",
privs = {ban=true},
func = function(name, param)
if param == "" then
@@ -922,7 +922,7 @@ core.register_chatcommand("ban", {
end
end
if not core.get_player_by_name(param) then
- return false, "No such player."
+ return false, "Player is not online."
end
if not core.ban_player(param) then
return false, "Failed to ban player."
@@ -935,7 +935,7 @@ core.register_chatcommand("ban", {
core.register_chatcommand("unban", {
params = "<name> | <IP_address>",
- description = "Remove player ban",
+ description = "Remove IP ban belonging to a player/IP",
privs = {ban=true},
func = function(name, param)
if not core.unban_player_or_ip(param) then