Comparison

util/sasl/plain.lua @ 6777:5de6b93d0190

util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author Kim Alvefur <zash@zash.se>
date Sat, 21 Feb 2015 10:36:37 +0100
parent 5301:6279caf921f1
child 8095:57192cf193c7
comparison
equal deleted inserted replaced
6774:3965662ae091 6777:5de6b93d0190
14 local s_match = string.match; 14 local s_match = string.match;
15 local saslprep = require "util.encodings".stringprep.saslprep; 15 local saslprep = require "util.encodings".stringprep.saslprep;
16 local nodeprep = require "util.encodings".stringprep.nodeprep; 16 local nodeprep = require "util.encodings".stringprep.nodeprep;
17 local log = require "util.logger".init("sasl"); 17 local log = require "util.logger".init("sasl");
18 18
19 module "sasl.plain" 19 local _ENV = nil;
20 20
21 -- ================================ 21 -- ================================
22 -- SASL PLAIN according to RFC 4616 22 -- SASL PLAIN according to RFC 4616
23 23
24 --[[ 24 --[[
80 end 80 end
81 81
82 return "success"; 82 return "success";
83 end 83 end
84 84
85 function init(registerMechanism) 85 local function init(registerMechanism)
86 registerMechanism("PLAIN", {"plain", "plain_test"}, plain); 86 registerMechanism("PLAIN", {"plain", "plain_test"}, plain);
87 end 87 end
88 88
89 return _M; 89 return {
90 init = init;
91 }