Software /
code /
prosody-modules
Changeset
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 |
parents | 3404:6444fb5dbb51 |
children | 3406:4cbb1e381431 |
files | mod_offline_email/mod_offline_email.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
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");