Allow boolean flag for loaded plugins
This is to simplify config templating
This commit is contained in:
parent
60c2b8bc08
commit
55d2d1d278
|
@ -276,7 +276,11 @@ plugin_unloaded(_Name, false) ->
|
|||
ok;
|
||||
plugin_unloaded(Name, true) ->
|
||||
case read_loaded() of
|
||||
{ok, Names} ->
|
||||
{ok, Names0} ->
|
||||
Names = lists:filtermap(fun(Name) when is_atom(Name) -> {true, Name};
|
||||
({Name, true}) -> {true, Name};
|
||||
({Name, false}) -> false
|
||||
end, Names0),
|
||||
case lists:member(Name, Names) of
|
||||
true ->
|
||||
write_loaded(lists:delete(Name, Names));
|
||||
|
|
Loading…
Reference in New Issue