Skip to content

Commit 1441281

Browse files
authoredMar 14, 2020
Fix some chatcommands not returning a value (#9503)
1 parent 8546d60 commit 1441281

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎builtin/common/information_formspecs.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ help_command.func = function(name, param)
136136
core.show_formspec(name, "__builtin:help_privs",
137137
build_privs_formspec(name))
138138
if name ~= admin then
139-
return
139+
return true
140140
end
141141
end
142142
if param == "" or param == "all" then
143143
core.show_formspec(name, "__builtin:help_cmds",
144144
build_chatcommands_formspec(name))
145145
if name ~= admin then
146-
return
146+
return true
147147
end
148148
end
149149

‎builtin/game/chat.lua

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ core.register_chatcommand("me", {
115115
privs = {shout=true},
116116
func = function(name, param)
117117
core.chat_send_all("* " .. name .. " " .. param)
118+
return true
118119
end,
119120
})
120121

@@ -919,6 +920,7 @@ core.register_chatcommand("shutdown", {
919920
core.chat_send_all("*** Server shutting down (operator request).")
920921
end
921922
core.request_shutdown(message:trim(), core.is_yes(reconnect), delay)
923+
return true
922924
end,
923925
})
924926

@@ -1001,6 +1003,7 @@ core.register_chatcommand("clearobjects", {
10011003
core.clear_objects(options)
10021004
core.log("action", "Object clearing done.")
10031005
core.chat_send_all("*** Cleared all objects.")
1006+
return true
10041007
end,
10051008
})
10061009

0 commit comments

Comments
 (0)
Please sign in to comment.