Software /
code /
prosody
Diff
util/jid.lua @ 118:76ac96c53ee5
Merge roster & presence from waqas
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 23:12:26 +0100 |
parent | 109:7efedc96352a |
child | 365:a59300fc22ec |
line wrap: on
line diff
--- a/util/jid.lua Wed Oct 22 17:36:21 2008 +0100 +++ b/util/jid.lua Wed Oct 22 23:12:26 2008 +0100 @@ -4,9 +4,12 @@ module "jid" function split(jid) - if not jid then return nil; end + if not jid then return; end + -- TODO verify JID, and return; if invalid local node = match(jid, "^([^@]+)@"); local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)"); local resource = match(jid, "/(.+)$"); return node, server, resource; end + +return _M; \ No newline at end of file