From: Matthew Wild Date: Fri, 21 Nov 2008 05:07:41 +0000 (+0000) Subject: Better names for variables X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=2dfa12d48e22af5a30fe66883775ebb35932fb31;p=prosody.git Better names for variables --- diff --git a/util/jid.lua b/util/jid.lua index efa79b38..2e40a338 100644 --- a/util/jid.lua +++ b/util/jid.lua @@ -5,11 +5,11 @@ module "jid" 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