2 short_opts.e = "echo"; |
2 short_opts.e = "echo"; |
3 |
3 |
4 return function (opts, args) |
4 return function (opts, args) |
5 local function on_connect(conn) |
5 local function on_connect(conn) |
6 conn:hook("incoming-raw", print); |
6 conn:hook("incoming-raw", print); |
7 io.stderr:write("Connected as ", conn.jid, "\n"); |
|
8 if opts.interactive or opts.stdin then |
7 if opts.interactive or opts.stdin then |
9 local stdin = { |
8 local stdin = { |
10 getfd = function () return 0; end; |
9 getfd = function () return 0; end; |
11 dirty = function (self) return false; end; |
10 dirty = function (self) return false; end; |
12 settimeout = function () end; |
11 settimeout = function () end; |