aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-20 23:28:16 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-20 23:28:16 +0000
commitc36a8743fed7cc3b75b3d71410f60f8ced4e65af (patch)
treeea646ae400192325e51014612ae3f8848371ed9a /util
parent902d98e4865d92ebeea81c0ddcb5a38fa63d1162 (diff)
downloadprosody-c36a8743fed7cc3b75b3d71410f60f8ced4e65af.tar.gz
prosody-c36a8743fed7cc3b75b3d71410f60f8ced4e65af.zip
Add jid.bare() helper function
Diffstat (limited to 'util')
-rw-r--r--util/jid.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/jid.lua b/util/jid.lua
index b1e4131d..c9ea5b73 100644
--- a/util/jid.lua
+++ b/util/jid.lua
@@ -12,4 +12,9 @@ function split(jid)
return node, server, resource;
end
+function bare(jid)
+ local node, host = split(jid);
+ return node.."@"..host;
+end
+
return _M; \ No newline at end of file