mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
232b274c55
subgame + mods
15 lines
443 B
Lua
Executable File
15 lines
443 B
Lua
Executable File
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) |