Changeset

534:3d6e0e037dab

mod_stanza_counter: removed a few empty lines.
author Marco Cirillo <maranda@lightwitch.org>
date Sun, 08 Jan 2012 03:52:06 +0000 (2012-01-08)
parents 533:47b9053dba38
children 535:39c7115be370
files mod_stanza_counter/mod_stanza_counter.lua
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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)
-