# HG changeset patch # User Kim Alvefur # Date 1430515988 -7200 # Node ID 65533afab352ff8f0aaca12e907aaa714f740f46 # Parent 0891b4e2776656a0ef8ffdce48ee5f1ab1088965 plugins.legacy: Make functions local diff -r 0891b4e27766 -r 65533afab352 plugins/legacy.lua --- a/plugins/legacy.lua Fri May 01 23:27:29 2015 +0200 +++ b/plugins/legacy.lua Fri May 01 23:33:08 2015 +0200 @@ -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(); @@ -52,13 +52,12 @@ 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);