beerchat/storage.lua

20 lines
696 B
Lua
Raw Normal View History

2019-08-05 08:33:20 +02:00
local main_channel_owner = "Beerholder" -- The owner of the main channel, usually ADMIN
local main_channel_color = "#ffffff" -- The color in hex of the main channel
2019-08-06 12:59:42 +02:00
if beerchat.mod_storage:get_string("channels") == "" then
2019-08-05 08:33:20 +02:00
minetest.log("action", "[beerchat] One off initializing mod storage")
2020-02-11 06:14:09 +01:00
beerchat.channels[beerchat.main_channel_name] = {
owner = main_channel_owner,
color = main_channel_color
}
2019-08-06 12:59:42 +02:00
beerchat.mod_storage:set_string("channels", minetest.write_json(beerchat.channels))
2019-08-05 08:33:20 +02:00
end
2019-08-06 12:59:42 +02:00
beerchat.channels = minetest.parse_json(beerchat.mod_storage:get_string("channels"))
2020-02-11 06:14:09 +01:00
beerchat.channels[beerchat.main_channel_name] = {
owner = main_channel_owner,
color = main_channel_color
}