From 53e53efa44eb78819670fd1d2f34e6fbac389d29 Mon Sep 17 00:00:00 2001 From: Alexander PapaTutuWawa Date: Fri, 30 Oct 2020 18:48:18 +0100 Subject: [PATCH] mix: Error out when mix and mix_pam are mixed --- mod_mix/mod_mix.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod_mix/mod_mix.lua b/mod_mix/mod_mix.lua index 357c591..dbb6901 100644 --- a/mod_mix/mod_mix.lua +++ b/mod_mix/mod_mix.lua @@ -1,6 +1,10 @@ local host = module:get_host(); +local mm = require("core.modulemanger"); if module:get_host_type() ~= "component" then - error("MIX should be loaded as a component", 0); + error("mix should be loaded as a component", 0); +end +if mm.is_loaded(host, "mix_pam") then + error("mix and mix_pam shouldn't be loaded together on the same host"); end local st = require("util.stanza");