Changeset

369:42de92add67b

Better names for variables
author Matthew Wild <mwild1@gmail.com>
date Fri, 21 Nov 2008 05:07:41 +0000
parents 368:34e88709b1b5
children 370:9ade55e059ea
files util/jid.lua
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/util/jid.lua	Fri Nov 21 05:06:35 2008 +0000
+++ b/util/jid.lua	Fri Nov 21 05:07:41 2008 +0000
@@ -5,11 +5,11 @@
 
 function split(jid)
 	if not jid then return; end
-	local node, nodelen = match(jid, "^([^@]+)@()");
-	local host, hostlen = match(jid, "^([^@/]+)()", nodelen)
+	local node, nodepos = match(jid, "^([^@]+)@()");
+	local host, hostpos = match(jid, "^([^@/]+)()", nodepos)
 	if node and not host then return nil, nil, nil; end
-	local resource = match(jid, "^/(.+)$", hostlen);
-	if (not host) or ((not resource) and #jid >= hostlen) then return nil, nil, nil; end
+	local resource = match(jid, "^/(.+)$", hostpos);
+	if (not host) or ((not resource) and #jid >= hostpos) then return nil, nil, nil; end
 	return node, host, resource;
 end