Software /
code /
clix
Diff
clix.lua @ 23:c5f04bdc7c64
clix, clix.raw: Move 'Connected as' to clix_connect(), and suppress on -q/--quiet
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 07 Jan 2010 22:05:25 +0000 |
parent | 21:cdeb02d9546d |
child | 28:c2998f70dfd4 |
line wrap: on
line diff
--- a/clix.lua Thu Jan 07 21:24:47 2010 +0000 +++ b/clix.lua Thu Jan 07 22:05:25 2010 +0000 @@ -9,8 +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", c = "chatroom" } +short_opts = { v = "verbose", q = "quiet", t = "to", f = "from", e = "type", + a = "account", p = "password", r = "resource", o = "presence", c = "chatroom" } local command = arg[1]; @@ -75,7 +75,9 @@ conn:close(); end); conn:hook("binding-success", function () - conn:debug("Connected: "..tostring(conn)); + if not opts.quiet then + io.stderr:write("clix: connected as ", conn.jid, "\n"); + end if opts.chatroom then conn:send(verse.presence{to=opts.to.."/"..(opts.nick or "clix")}); end