Mercurial > prosody-modules
comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 194:58c37562c67d
mod_muc_log_http: show more of the room title
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Mon, 05 Jul 2010 11:12:36 +0200 |
parents | 12d6316d9eab |
children | 07c17b60229a |
comparison
equal
deleted
inserted
replaced
193:18a0e5c0bb62 | 194:58c37562c67d |
---|---|
340 if attributes ~= nil and room ~= nil then | 340 if attributes ~= nil and room ~= nil then |
341 local first = 1; | 341 local first = 1; |
342 local alreadyDoneYears = {}; | 342 local alreadyDoneYears = {}; |
343 local temptime = {day=0, month=0, year=0}; | 343 local temptime = {day=0, month=0, year=0}; |
344 topic = room._data.subject or "(no subject)" | 344 topic = room._data.subject or "(no subject)" |
345 if topic:len() > 60 then | 345 if topic:len() > 135 then |
346 topic = topic:sub(1, topic:find(" ", 50)) .. " ..." | 346 topic = topic:sub(1, topic:find(" ", 120)) .. " ..." |
347 end | 347 end |
348 for folder in lfs.dir(path) do | 348 for folder in lfs.dir(path) do |
349 local year, month, day = folder:match("^(%d%d)(%d%d)(%d%d)"); | 349 local year, month, day = folder:match("^(%d%d)(%d%d)(%d%d)"); |
350 if year ~= nil and alreadyDoneYears[year] == nil then | 350 if year ~= nil and alreadyDoneYears[year] == nil then |
351 temptime.day = tonumber(day) | 351 temptime.day = tonumber(day) |