Software /
code /
prosody
File
util/jid.lua @ 30:bcf539295f2d
Huge commit to:
* Break stanza routing (to be restored in a future commit)
* Remove the old stanza_dispatcher code, which was never going to be maintainable nor extendable :)
* Bring us plugins, starting with mod_legacyauth and mod_roster
* Sessions are now created/destroyed using a standard sessionmanager interface
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 30 Sep 2008 19:52:00 +0100 |
parent | 29:b847875801e5 |
child | 104:cfbd3b849f9e |
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