Software /
code /
verse
Changeset
73:b416751df2ca
verse.plugins.session: Convert from spaces to tabs
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 30 May 2010 02:37:03 +0100 |
parents | 72:1649a6022adb |
children | 74:91e80e9f0259 |
files | plugins/session.lua |
diffstat | 1 files changed, 15 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/session.lua Fri May 28 23:32:16 2010 +0100 +++ b/plugins/session.lua Sun May 30 02:37:03 2010 +0100 @@ -2,19 +2,19 @@ local xmlns_session = "urn:ietf:params:xml:ns:xmpp-session"; function verse.plugins.session(stream) - local function handle_binding(jid) - stream:debug("Establishing Session..."); - stream:send_iq(st.iq({ type = "set" }):tag("session", {xmlns=xmlns_session}), - function (reply) - if reply.attr.type == "result" then - stream:event("session-success"); - elseif reply.attr.type == "error" then - local err = reply:child_with_name("error"); - local type, condition, text = reply:get_error(); - stream:event("session-failure", { error = condition, text = text, type = type }); - end - end); - end - stream:hook("binding-success", handle_binding); - return true; + local function handle_binding(jid) + stream:debug("Establishing Session..."); + stream:send_iq(st.iq({ type = "set" }):tag("session", {xmlns=xmlns_session}), + function (reply) + if reply.attr.type == "result" then + stream:event("session-success"); + elseif reply.attr.type == "error" then + local err = reply:child_with_name("error"); + local type, condition, text = reply:get_error(); + stream:event("session-failure", { error = condition, text = text, type = type }); + end + end); + end + stream:hook("binding-success", handle_binding); + return true; end