projects
/
prosody.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fixing jid.split() for all JIDs
[prosody.git]
/
util
/
jid.lua
1
2
local match = string.match;
3
4
module "jid"
5
6
function split(jid)
7
local node = match(jid, "^([^@]+)@");
8
local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)");
9
local resource = match(jid, "/(.+)$");
10
return node, server, resource;
11
end