clix/raw.lua

changeset 23
c5f04bdc7c64
parent 19
3a0a156e0a79
child 27
5b58c002d6ad
equal deleted inserted replaced
22:19c5a66837ed 23:c5f04bdc7c64
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;

mercurial