aboutsummaryrefslogtreecommitdiffstats
path: root/util/jid.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/jid.lua')
-rw-r--r--util/jid.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/jid.lua b/util/jid.lua
new file mode 100644
index 00000000..9d01e2af
--- /dev/null
+++ b/util/jid.lua
@@ -0,0 +1,8 @@
+
+local match = string.match;
+
+module "jid"
+
+function split(jid)
+ return match(jid, "^([^@]+)@([^/]+)/?(.*)$");
+end