Diff

util/jid.lua @ 365:a59300fc22ec

Add jid.bare() helper function
author Matthew Wild <mwild1@gmail.com>
date Thu, 20 Nov 2008 23:28:16 +0000
parent 109:7efedc96352a
child 366:5691edc7dd63
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