diff --git a/gui.lua b/gui.lua index 20f0a30..796171d 100644 --- a/gui.lua +++ b/gui.lua @@ -322,7 +322,7 @@ function mail.replyall(name, message) mail.ensure_new_format(message) local replyfooter = "Type your reply here.\n\n--Original message follows--\n" ..message.body -- new recipients are the sender plus the original recipients, minus ourselves - local recipients = message.to + local recipients = message.to or "" if message.sender ~= nil then recipients = message.sender .. ", " .. recipients end diff --git a/migrate.lua b/migrate.lua index 5780732..66dc6b2 100644 --- a/migrate.lua +++ b/migrate.lua @@ -29,8 +29,7 @@ end mail.migrate_contacts = function(playername) local file = io.open(mail.getContactsFile(playername), 'r') if not file then - file:close() -- file doesn't exist! This is a case for Migrate Man! - + -- file doesn't exist! This is a case for Migrate Man! local messages = mail.getMessages(playername) local contacts = {} diff --git a/util/normalize.lua b/util/normalize.lua index ec440d9..76b8fee 100644 --- a/util/normalize.lua +++ b/util/normalize.lua @@ -36,6 +36,7 @@ function mail.concat_player_list(order) end function mail.player_in_list(name, list) + list = list or {} if type(list) == "string" then list = mail.parse_player_list(list) end