diff -r 1793fca3d707 -r 751db005032e clix.lua --- a/clix.lua Thu Jan 07 02:31:18 2010 +0000 +++ b/clix.lua Thu Jan 07 02:35:04 2010 +0000 @@ -9,7 +9,7 @@ require "verse.client" -- Global to allow commands to add to it -short_opts = { v = "verbose", t = "to", f = "from", e = "type", a = "account", p = "password" } +short_opts = { v = "verbose", t = "to", f = "from", e = "type", a = "account", p = "password", r = "resource" } local command = arg[1]; @@ -79,9 +79,14 @@ -- Optional config parameters conn.connect_host = account.address; conn.connect_port = account.port; + -- Connect! conn:connect_client(account.jid, account.password); + if type(opts.resource) == "string" then + conn.resource = opts.resource; + end + local ok, ret = pcall(verse.loop); if not ok and not ret:match("interrupted!$") then io.stderr:write("Fatal error: ", ret, "\n");