diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-10-22 23:12:26 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-10-22 23:12:26 +0100 |
commit | e92bd250d19de43dfe0584108d12577bbe1a1c2a (patch) | |
tree | 01823b0990afedda8cc7ca448f9f975cd6e9d936 /util/jid.lua | |
parent | ee7b432ab1d450a42fae24b37c79b7fbda7f4e6b (diff) | |
parent | c3ca55e0195d03c3e0c23590c387c49068be7723 (diff) | |
download | prosody-e92bd250d19de43dfe0584108d12577bbe1a1c2a.tar.gz prosody-e92bd250d19de43dfe0584108d12577bbe1a1c2a.zip |
Merge roster & presence from waqas
Diffstat (limited to 'util/jid.lua')
-rw-r--r-- | util/jid.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/jid.lua b/util/jid.lua index 28dd1a92..b1e4131d 100644 --- a/util/jid.lua +++ b/util/jid.lua @@ -4,9 +4,12 @@ local match = string.match; 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 |