Mercurial > prosody-hg
view util/jid.lua @ 107:8d8debda3df2
Added: Roster manipulation functions to core.rostermanager
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 17 Oct 2008 22:19:26 +0500 |
| parents | cfbd3b849f9e |
| children | 7efedc96352a |
line wrap: on
line source
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 return _M;
