aboutsummaryrefslogtreecommitdiffstats
path: root/util/jid.lua
diff options
context:
space:
mode:
authormatthew <devnull@localhost>2008-08-22 21:09:04 +0000
committermatthew <devnull@localhost>2008-08-22 21:09:04 +0000
commitd0a4f8f2fb4b0927a67ebc7428d6c5cb66d2fbd4 (patch)
tree7582e73a42b4becdfb964269bfaee8ab3a16317c /util/jid.lua
downloadprosody-d0a4f8f2fb4b0927a67ebc7428d6c5cb66d2fbd4.tar.gz
prosody-d0a4f8f2fb4b0927a67ebc7428d6c5cb66d2fbd4.zip
First commit, where do you want to go tomorrow?
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