From c36a8743fed7cc3b75b3d71410f60f8ced4e65af Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 20 Nov 2008 23:28:16 +0000 Subject: Add jid.bare() helper function --- util/jid.lua | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3