diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-11-20 23:28:16 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-11-20 23:28:16 +0000 |
commit | c36a8743fed7cc3b75b3d71410f60f8ced4e65af (patch) | |
tree | ea646ae400192325e51014612ae3f8848371ed9a /util | |
parent | 902d98e4865d92ebeea81c0ddcb5a38fa63d1162 (diff) | |
download | prosody-c36a8743fed7cc3b75b3d71410f60f8ced4e65af.tar.gz prosody-c36a8743fed7cc3b75b3d71410f60f8ced4e65af.zip |
Add jid.bare() helper function
Diffstat (limited to 'util')
-rw-r--r-- | util/jid.lua | 5 |
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 |