File

util/xpcall.lua @ 9728:d41ce505cdf9 0.11

mod_mam: Only accept valid JIDs in <always/> and <never/> prefs. (fixes #1275)
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 23 Dec 2018 15:25:01 +0100
parent 9561:cfc7b2f7251e
child 12975:d10957394a3c
line wrap: on
line source

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"util.compat".xpcall;
end

return {
	xpcall = xpcall;
};