1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-09-18 10:40:22 +02:00
server-nalc/mods/_misc/chatlog.lua
LeMagnesium 7024b29415 - Fixing seawrecks' awards' itemstrings in U-boots
- Tracking (again) _misc (untracking has probably disabled the IRC bot MFF-Bot)
2014-11-08 12:41:57 +01:00

15 lines
443 B
Lua

local chatlog = minetest.get_worldpath().."/chatlog.txt"
monthfirst = true -- Wheter the 1st of Feb should be 1/2/13(monthfirst = true) or 2/1/13(monthfirst = false)
function playerspeak(name,msg)
f = io.open(chatlog, "a")
if monthfirst then
f:write(os.date("(%m/%d/%y %X) ["..name.."]: "..msg.."\n"))
else
f:write(os.date("(%d/%m/%y %X) ["..name.."]: "..msg.."\n"))
end
f:close()
end
minetest.register_on_chat_message(playerspeak)