clix/sendfile.lua

changeset 44
3c3cc6d75814
child 47
d4650cc6bb3f
equal deleted inserted replaced
43:1ec64b321834 44:3c3cc6d75814
1 return function (opts, arg)
2 if opts.short_help then
3 print("Send files");
4 return;
5 end
6 if (#arg == 0 or opts.help) and not opts.interactive then
7 return 0;
8 end
9 local function on_connect(conn)
10 conn:hook("proxy65/discovered-proxies", function ()
11 conn:debug("Sending %s to %s", arg[2], arg[1]);
12 conn:send_file(arg[1], arg[2]);
13 end);
14 end
15 clix_connect(opts, on_connect, { "disco", "proxy65", "jingle", "jingle_ft", "jingle_s5b" });
16 end

mercurial