clix/sendfile.lua

Sat, 12 Mar 2011 19:12:04 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 12 Mar 2011 19:12:04 +0000
changeset 47
d4650cc6bb3f
parent 44
3c3cc6d75814
permissions
-rw-r--r--

sendfile: Small fix for command description

return function (opts, arg)
	if opts.short_help then
		print("Send a file");
		return;
	end
	if (#arg == 0 or opts.help) and not opts.interactive then
		return 0;
	end
	local function on_connect(conn)
		conn:hook("proxy65/discovered-proxies", function ()
			conn:debug("Sending %s to %s", arg[2], arg[1]);
			conn:send_file(arg[1], arg[2]);
		end);
	end
	clix_connect(opts, on_connect, { "disco", "proxy65", "jingle", "jingle_ft", "jingle_s5b" });
end

mercurial