Use LuaSocket's base 64 encoding function

This commit is contained in:
ShadowNinja
2014-05-28 19:36:15 -04:00
parent 26ca287b09
commit 8e6a9a287f
3 changed files with 3 additions and 22 deletions

View File

@ -1,6 +1,8 @@
-- This file is licensed under the terms of the BSD 2-clause license.
-- See LICENSE.txt for details.
-- MIME is part of LuaSocket
local b64e = require("mime").b64
irc.hooks = {}
irc.registered_hooks = {}
@ -213,7 +215,7 @@ end
function irc.hooks.preregister(conn)
if not (irc.config["sasl.user"] and irc.config["sasl.pass"]) then return end
local authString = irc.b64e(
local authString = b64e(
("%s\x00%s\x00%s"):format(
irc.config["sasl.user"],
irc.config["sasl.user"],