52 end; |
52 end; |
53 |
53 |
54 connects = function (client) |
54 connects = function (client) |
55 local wait, done = async.waiter(); |
55 local wait, done = async.waiter(); |
56 client.stream:hook("ready", function () |
56 client.stream:hook("ready", function () |
|
57 client.stream.conn:pause() |
57 client.log"ready" |
58 client.log"ready" |
58 done() |
59 done() |
59 client.log("ready done") |
60 client.log("ready done") |
60 client.stream.conn:pause() |
|
61 end); |
61 end); |
62 client.stream:connect_client(client.jid, client.password); |
62 client.stream:connect_client(client.jid, client.password); |
63 wait(); |
63 wait(); |
64 client.full_jid = client.stream.jid; |
64 client.full_jid = client.stream.jid; |
65 client.host = client.stream.host; |
65 client.host = client.stream.host; |