Fix random_messages bug

This commit is contained in:
rubenwardy 2016-02-14 19:28:45 +00:00
parent 3070001a88
commit f4e70557d3
2 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View file

@ -4,6 +4,7 @@
*bak* *bak*
tags tags
*.vim *.vim
debug.txt
## Files related to minetest development cycle ## Files related to minetest development cycle
*.patch *.patch

View file

@ -64,8 +64,9 @@ function random_messages.read_messages()
end end
function random_messages.display_message(message_number) function random_messages.display_message(message_number)
if random_messages.messages[message_number] then local msg = random_messages.messages[message_number] or message_number
minetest.chat_send_all(random_messages.messages[message_number]) if msg then
minetest.chat_send_all(msg)
end end
end end