Software /
code /
verse
Diff
plugins/legacy.lua @ 399:82ad158714e5
Merge with Zash
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 12 Jan 2016 13:14:36 +0000 |
parent | 381:65533afab352 |
child | 457:73d4eb93657b |
line wrap: on
line diff
--- a/plugins/legacy.lua Sat Jan 09 11:03:30 2016 +0000 +++ b/plugins/legacy.lua Tue Jan 12 13:14:36 2016 +0000 @@ -4,7 +4,7 @@ local xmlns_auth = "jabber:iq:auth"; function verse.plugins.legacy(stream) - function handle_auth_form(result) + local function handle_auth_form(result) local query = result:get_child("query", xmlns_auth); if result.attr.type ~= "result" or not query then local type, cond, text = result:get_error(); @@ -51,14 +51,13 @@ end end); end - - function handle_opened(attr) + + local function handle_opened(attr) if not attr.version then stream:send_iq(verse.iq({type="get"}) :tag("query", { xmlns = "jabber:iq:auth" }) :tag("username"):text(stream.username), handle_auth_form); - end end stream:hook("opened", handle_opened);