112 end |
112 end |
113 end |
113 end |
114 |
114 |
115 function deregister_component(host) |
115 function deregister_component(host) |
116 if components[host] then |
116 if components[host] then |
|
117 modulemanager.unload(host, "tls"); |
117 modulemanager.unload(host, "dialback"); |
118 modulemanager.unload(host, "dialback"); |
118 hosts[host].connected = nil; |
119 hosts[host].connected = nil; |
119 local host_config = configmanager.getconfig()[host]; |
120 local host_config = configmanager.getconfig()[host]; |
120 if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then |
121 if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then |
121 -- Set default handler |
122 -- Set default handler |