# HG changeset patch # User Matthew Wild # Date 1371327429 -3600 # Node ID 3af947e2e6d45842bc424e0e97ff397d888b5a3c # Parent 87a091f88a1d0c3b32f879e5bab3a15d485742a9 mod_statistics/stats.lib.lua: Only fetch shared tables if running under Prosody diff -r 87a091f88a1d -r 3af947e2e6d4 mod_statistics/stats.lib.lua --- a/mod_statistics/stats.lib.lua Sat Jun 15 21:02:48 2013 +0100 +++ b/mod_statistics/stats.lib.lua Sat Jun 15 21:17:09 2013 +0100 @@ -27,8 +27,10 @@ local get_time = require "socket".gettime; local active_sessions, active_jids = {}, {}; -local s2s_sessions = module:shared"/*/s2s/sessions"; -local c2s_sessions = module:shared"/*/c2s/sessions"; +local c2s_sessions, s2s_sessions; +if prosody and prosody.arg then + c2s_sessions, s2s_sessions = module:shared("/*/c2s/sessions", "/*/s2s/sessions"); +end local stats = { total_users = {