util/jid.lua

Sat, 04 Oct 2008 19:51:59 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sat, 04 Oct 2008 19:51:59 +0500
changeset 58
85a93adef6f6
parent 29
b847875801e5
child 104
cfbd3b849f9e
permissions
-rw-r--r--

Removed unused functions


local match = string.match;

module "jid"

function split(jid)
	if not jid then return nil; end
	local node = match(jid, "^([^@]+)@");
	local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)");
	local resource = match(jid, "/(.+)$");
	return node, server, resource;
end

mercurial