Software /
code /
prosody-modules
Diff
mod_offline_email/mod_offline_email.lua @ 3405:bd71c97de1d0
mod_offline_email: Allow LuaSocket to pollute the global scope, fixes traceback (*sigh*)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Dec 2018 13:54:53 +0100 |
parent | 1285:f1a0a0754b87 |
child | 4231:ee724c7fa8e0 |
line wrap: on
line diff
--- a/mod_offline_email/mod_offline_email.lua Thu Dec 13 14:32:17 2018 +0100 +++ b/mod_offline_email/mod_offline_email.lua Sun Dec 16 13:54:53 2018 +0100 @@ -2,7 +2,10 @@ local jid_bare = require "util.jid".bare; local os_time = os.time; local t_concat = table.concat; + +prosody.unlock_globals(); -- LuaSocket wants to pollute the global scope local smtp = require "socket.smtp"; +prosody.lock_globals(); local smtp_server = module:get_option_string("smtp_server", "localhost"); local smtp_user = module:get_option_string("smtp_username");