aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/chat.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/game/chat.lua')
-rw-r--r--builtin/game/chat.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua
index d0d456a46..fd1379162 100644
--- a/builtin/game/chat.lua
+++ b/builtin/game/chat.lua
@@ -115,6 +115,7 @@ core.register_chatcommand("me", {
privs = {shout=true},
func = function(name, param)
core.chat_send_all("* " .. name .. " " .. param)
+ return true
end,
})
@@ -141,7 +142,7 @@ core.register_chatcommand("privs", {
end
return true, "Privileges of " .. name .. ": "
.. core.privs_to_string(
- core.get_player_privs(name), ' ')
+ core.get_player_privs(name), ", ")
end,
})
@@ -919,12 +920,13 @@ core.register_chatcommand("shutdown", {
core.chat_send_all("*** Server shutting down (operator request).")
end
core.request_shutdown(message:trim(), core.is_yes(reconnect), delay)
+ return true
end,
})
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
@@ -936,7 +938,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."
@@ -949,7 +951,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
@@ -995,12 +997,13 @@ core.register_chatcommand("clearobjects", {
core.log("action", name .. " clears all objects ("
.. options.mode .. " mode).")
- core.chat_send_all("Clearing all objects. This may take long."
- .. " You may experience a timeout. (by "
+ core.chat_send_all("Clearing all objects. This may take a long time."
+ .. " You may experience a timeout. (by "
.. name .. ")")
core.clear_objects(options)
core.log("action", "Object clearing done.")
core.chat_send_all("*** Cleared all objects.")
+ return true
end,
})