equal
deleted
inserted
replaced
100 local function room_save(room, forced) |
100 local function room_save(room, forced) |
101 local node = jid_split(room.jid); |
101 local node = jid_split(room.jid); |
102 local is_persistent = persistent.get(room); |
102 local is_persistent = persistent.get(room); |
103 persistent_rooms:set(nil, room.jid, is_persistent); |
103 persistent_rooms:set(nil, room.jid, is_persistent); |
104 if is_persistent then |
104 if is_persistent then |
105 local data = { |
105 local data = room:freeze(); |
106 jid = room.jid; |
|
107 _data = room._data; |
|
108 _affiliations = room._affiliations; |
|
109 }; |
|
110 room_configs:set(node, data); |
106 room_configs:set(node, data); |
111 elseif forced then |
107 elseif forced then |
112 room_configs:set(node, nil); |
108 room_configs:set(node, nil); |
113 if not next(room._occupants) then -- Room empty |
109 if not next(room._occupants) then -- Room empty |
114 rooms[room.jid] = nil; |
110 rooms[room.jid] = nil; |