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*
tags
*.vim
debug.txt
## Files related to minetest development cycle
*.patch

View file

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