Changeset

381:65533afab352

plugins.legacy: Make functions local
author Kim Alvefur <zash@zash.se>
date Fri, 01 May 2015 23:33:08 +0200
parents 380:0891b4e27766
children 382:479b856a910f
files plugins/legacy.lua
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);