comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 192:12d6316d9eab

mod_muc_log_http: Fixed a traceback on rooms with no subject.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 04 Jul 2010 23:38:54 +0500
parents 03cb7511ae54
children 58c37562c67d
comparison
equal deleted inserted replaced
191:fa7165dd82ee 192:12d6316d9eab
339 end 339 end
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 344 topic = room._data.subject or "(no subject)"
345 if topic:len() > 60 then 345 if topic:len() > 60 then
346 topic = topic:sub(1, topic:find(" ", 50)) .. " ..." 346 topic = topic:sub(1, topic:find(" ", 50)) .. " ..."
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)");