diff -r 0b0fe49e5251 -r 27441b099984 util/jid.lua --- a/util/jid.lua Sun Nov 29 21:32:39 2009 +0100 +++ b/util/jid.lua Sun Nov 29 21:33:37 2009 +0100 @@ -65,4 +65,17 @@ return host; end +function join(node, host, resource) + if node and host and resource then + return node.."@"..host.."/"..resource; + elseif node and host then + return node.."@"..host; + elseif host and resource then + return host.."/"..resource; + elseif host then + return host; + end + return nil; -- Invalid JID +end + return _M;