mod_stanza_counter: removed a few empty lines.
--- a/mod_stanza_counter/mod_stanza_counter.lua Sun Jan 08 03:51:16 2012 +0000
+++ b/mod_stanza_counter/mod_stanza_counter.lua Sun Jan 08 03:52:06 2012 +0000
@@ -14,9 +14,7 @@
end
-- Setup on server start
-local function setup()
- init_counter();
-end
+local function setup() init_counter() end
-- Basic Stanzas' Counters
local function iq_callback(check)
@@ -24,7 +22,7 @@
local origin, stanza = self.origin, self.stanza
if not prosody.stanza_counter then init_counter() end
if check then
- if not stanza.attr.to or hosts[jid_bare(stanza.attr.to)] then return nil;
+ if not stanza.attr.to or hosts[jid_bare(stanza.attr.to)] then return nil
else
prosody.stanza_counter.iq["outgoing"] = prosody.stanza_counter.iq["outgoing"] + 1
end
@@ -39,7 +37,7 @@
local origin, stanza = self.origin, self.stanza
if not prosody.stanza_counter then init_counter() end
if check then
- if not stanza.attr.to or hosts[jid_bare(stanza.attr.to)] then return nil;
+ if not stanza.attr.to or hosts[jid_bare(stanza.attr.to)] then return nil
else
prosody.stanza_counter.message["outgoing"] = prosody.stanza_counter.message["outgoing"] + 1
end
@@ -54,7 +52,7 @@
local origin, stanza = self.origin, self.stanza
if not prosody.stanza_counter then init_counter() end
if check then
- if not stanza.attr.to or hosts[jid_bare(stanza.attr.to)] then return nil;
+ if not stanza.attr.to or hosts[jid_bare(stanza.attr.to)] then return nil
else
prosody.stanza_counter.presence["outgoing"] = prosody.stanza_counter.presence["outgoing"] + 1
end
@@ -64,8 +62,6 @@
end
end
-
-
-- Hook all pre-stanza events.
module:hook("pre-iq/bare", iq_callback(true), 140)
module:hook("pre-iq/full", iq_callback(true), 140)
@@ -94,4 +90,3 @@
-- Hook server start to initialize the counter.
module:hook("server-started", setup)
-