Changeset

365:a59300fc22ec

Add jid.bare() helper function
author Matthew Wild <mwild1@gmail.com>
date Thu, 20 Nov 2008 23:28:16 +0000
parents 364:02b8f2ffa6a7
children 366:5691edc7dd63
files util/jid.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/jid.lua	Thu Nov 20 22:42:37 2008 +0000
+++ b/util/jid.lua	Thu Nov 20 23:28:16 2008 +0000
@@ -12,4 +12,9 @@
 	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