Mercurial > prosody-hg
comparison plugins/muc/mod_muc.lua @ 1781:b3eee6151592
MUC: Removed some debug logging.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Mon, 14 Sep 2009 02:11:17 +0500 |
| parents | 668ce0a2050d |
| children | 4f33100195a0 |
comparison
equal
deleted
inserted
replaced
| 1780:668ce0a2050d | 1781:b3eee6151592 |
|---|---|
| 29 | 29 |
| 30 local function room_route_stanza(room, stanza) core_post_stanza(component, stanza); end | 30 local function room_route_stanza(room, stanza) core_post_stanza(component, stanza); end |
| 31 local function room_save(room, forced) | 31 local function room_save(room, forced) |
| 32 local node = jid_split(room.jid); | 32 local node = jid_split(room.jid); |
| 33 persistent_rooms[room.jid] = room._data.persistent; | 33 persistent_rooms[room.jid] = room._data.persistent; |
| 34 module:log("debug", "1, %s, %s", room.jid, tostring(room._data.persistent)); | |
| 35 if room._data.persistent then | 34 if room._data.persistent then |
| 36 module:log("debug", "2"); | |
| 37 local history = room._data.history; | 35 local history = room._data.history; |
| 38 room._data.history = nil; | 36 room._data.history = nil; |
| 39 local data = { | 37 local data = { |
| 40 jid = room.jid; | 38 jid = room.jid; |
| 41 _data = room._data; | 39 _data = room._data; |
| 42 _affiliations = room._affiliations; | 40 _affiliations = room._affiliations; |
| 43 }; | 41 }; |
| 44 datamanager.store(node, muc_host, "config", data); | 42 datamanager.store(node, muc_host, "config", data); |
| 45 room._data.history = history; | 43 room._data.history = history; |
| 46 elseif forced then | 44 elseif forced then |
| 47 module:log("debug", "3"); | |
| 48 datamanager.store(node, muc_host, "config", nil); | 45 datamanager.store(node, muc_host, "config", nil); |
| 49 end | 46 end |
| 50 module:log("debug", "4"); | |
| 51 if forced then datamanager.store(nil, muc_host, "persistent", persistent_rooms); end | 47 if forced then datamanager.store(nil, muc_host, "persistent", persistent_rooms); end |
| 52 end | 48 end |
| 53 | 49 |
| 54 for jid in pairs(persistent_rooms) do | 50 for jid in pairs(persistent_rooms) do |
| 55 local node = jid_split(jid); | 51 local node = jid_split(jid); |
