Comparison

core/modulemanager.lua @ 4733:791388f90156

modulemanager: Clear modulemap when a host is deactivated (thanks xnyhps)
author Matthew Wild <mwild1@gmail.com>
date Fri, 27 Apr 2012 22:36:35 +0100
parent 4728:7c81b04a4fed
child 4745:d5b1a7531693
comparison
equal deleted inserted replaced
4732:29ff25c8bf56 4733:791388f90156
80 for module in modules do 80 for module in modules do
81 load(host, module); 81 load(host, module);
82 end 82 end
83 end 83 end
84 prosody.events.add_handler("host-activated", load_modules_for_host); 84 prosody.events.add_handler("host-activated", load_modules_for_host);
85 prosody.events.add_handler("host-deactivated", function (host)
86 modulemap[host] = nil;
87 end);
85 88
86 --- Private helpers --- 89 --- Private helpers ---
87 90
88 local function do_unload_module(host, name) 91 local function do_unload_module(host, name)
89 local mod = get_module(host, name); 92 local mod = get_module(host, name);