comparison mod_statistics/stats.lib.lua @ 1075:164ed759b1d2

mod_statistics/stats.lib.lua: Better check for prosody vs prosodyctl
author Kim Alvefur <zash@zash.se>
date Sat, 15 Jun 2013 20:43:10 +0100
parents 4dbdb1b465e8
children 5616cab8b6d6
comparison
equal deleted inserted replaced
1074:cccd9f6a628d 1075:164ed759b1d2
69 tostring = "%s%%"; 69 tostring = "%s%%";
70 }; 70 };
71 }; 71 };
72 72
73 local add_statistics_filter; -- forward decl 73 local add_statistics_filter; -- forward decl
74 if prosody and prosody.full_sessions then -- start_time ensures we aren't in prosodyctl 74 if prosody and prosody.arg then -- ensures we aren't in prosodyctl
75 setmetatable(active_sessions, { 75 setmetatable(active_sessions, {
76 __index = function ( t, k ) 76 __index = function ( t, k )
77 local v = { 77 local v = {
78 bytes_in = 0, bytes_out = 0; 78 bytes_in = 0, bytes_out = 0;
79 stanzas_in = { 79 stanzas_in = {