# HG changeset patch # User Matthew Wild # Date 1275184142 -3600 # Node ID 9271673212839914c77982b5a51d28aaf7e50c81 # Parent f5ac4e39e84f8b822c7707ffd3f54fd23d418126 verse.client: Fire 'ready' event on stream when resource binding or session negotiation is complete, hook this instead of binding-success diff -r f5ac4e39e84f -r 927167321283 client.lua --- a/client.lua Sun May 30 02:47:19 2010 +0100 +++ b/client.lua Sun May 30 02:49:02 2010 +0100 @@ -97,6 +97,12 @@ return ret; end, -1); + local function stream_ready() + self:event("ready"); + end + self:hook("session-success", stream_ready, -1) + self:hook("binding-success", stream_ready, -1); + -- Initialise connection self:connect(self.connect_host or self.host, self.connect_port or 5222); self:reopen();