Software /
code /
clix
Diff
clix.lua @ 21:cdeb02d9546d
clix, clix.send: Support for chatrooms (-c/--chatroom with --nick=somenick)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 07 Jan 2010 21:22:27 +0000 |
parent | 20:80cc61512f10 |
child | 23:c5f04bdc7c64 |
line wrap: on
line diff
--- a/clix.lua Thu Jan 07 20:59:15 2010 +0000 +++ b/clix.lua Thu Jan 07 21:22:27 2010 +0000 @@ -9,7 +9,8 @@ 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", r = "resource", o = "presence" } +short_opts = { v = "verbose", t = "to", f = "from", e = "type", a = "account", + p = "password", r = "resource", o = "presence", c = "chatroom" } local command = arg[1]; @@ -75,6 +76,9 @@ end); conn:hook("binding-success", function () conn:debug("Connected: "..tostring(conn)); + if opts.chatroom then + conn:send(verse.presence{to=opts.to.."/"..(opts.nick or "clix")}); + end if opts.presence then conn:send(verse.presence()); end