diff -r ed12e00991b1 -r a8f6fd6a70ed util/sasl/plain.lua --- a/util/sasl/plain.lua Thu Sep 18 19:17:10 2014 +0200 +++ b/util/sasl/plain.lua Thu Sep 18 20:32:38 2014 +0200 @@ -1,10 +1,9 @@ -return function (stream, mechanisms, preference) - if stream.username and stream.password then - mechanisms["PLAIN"] = function (stream) +return function (stream, name) + if name == "PLAIN" and stream.username and stream.password then + return function (stream) return "success" == coroutine.yield("\0"..stream.username.."\0"..stream.password); - end; - preference["PLAIN"] = 5; + end, 5; end end