From 17d2fd9f75c0f87787a08fe673e3e33bfd72a7da Mon Sep 17 00:00:00 2001 From: Isidor Zeuner Date: Fri, 6 Oct 2017 02:56:20 +0200 Subject: [PATCH] avoid error on closing null file handle --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 78773ac..46b39fc 100644 --- a/init.lua +++ b/init.lua @@ -64,6 +64,7 @@ function random_messages.read_messages() -- blame the admin if not found output:write(S("Blame the server admin! He/She has probably not edited the random messages yet.\n")) output:write(S("Tell your dumb admin that this line is in (worldpath)/random_messages\n")) + return else -- or write default_input content in worldpath message file local content = default_input:read("*all")