Mercurial > prosody-modules
comparison mod_statistics/mod_statistics.lua @ 1343:7dbde05b48a9
all the things: Remove trailing whitespace
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Tue, 11 Mar 2014 18:44:01 +0100 |
parents | cccd9f6a628d |
children | 4713f9d453ec |
comparison
equal
deleted
inserted
replaced
1342:0ae065453dc9 | 1343:7dbde05b48a9 |
---|---|
52 local active_sessions = stats.active_sessions; | 52 local active_sessions = stats.active_sessions; |
53 | 53 |
54 -- Handle statistics provided by other modules | 54 -- Handle statistics provided by other modules |
55 local function item_handlers(host) | 55 local function item_handlers(host) |
56 host = host and (host.."/") or ""; | 56 host = host and (host.."/") or ""; |
57 | 57 |
58 return function (event) -- Added | 58 return function (event) -- Added |
59 local stats = event.item.statistics; | 59 local stats = event.item.statistics; |
60 local group = host..(stats.name and (stats.name.."::") or ""); | 60 local group = host..(stats.name and (stats.name.."::") or ""); |
61 for name, stat in pairs(stats) do | 61 for name, stat in pairs(stats) do |
62 available_stats[group..name] = stat; | 62 available_stats[group..name] = stat; |
115 active_sessions[session] = nil; | 115 active_sessions[session] = nil; |
116 push_session_to_all(session, session_stats); | 116 push_session_to_all(session, session_stats); |
117 end | 117 end |
118 return 1; | 118 return 1; |
119 end); | 119 end); |
120 | 120 |
121 end | 121 end |
122 function module.unload() | 122 function module.unload() |
123 filters.remove_filter_hook(stats.filter_hook); | 123 filters.remove_filter_hook(stats.filter_hook); |
124 end | 124 end |
125 function module.command( args ) | 125 function module.command( args ) |