Commit Graph

188 Commits (489ea2958d2b4bfe15835cd043cbb7d376f0df62)

Author SHA1 Message Date
Matthew Wild fc11973174 modulemanager: Pass the module's final host (e.g. '*') to the module-loaded event 14 years ago
Matthew Wild 945e41b4e0 modulemanager: Hide deprecation warning for modules loaded on '*' directly (e.g. prosodyctl mod_<command>) (thanks Zash) 14 years ago
Matthew Wild 4bb43a3fb6 modulemanager: Fixes to handle circular dependencies in module:depends() 14 years ago
Matthew Wild a4d9a4101e modulemanager: Remove unused function imports 14 years ago
Matthew Wild f07d1d5441 modulemanager: Remove unused NULL declaration 14 years ago
Matthew Wild 9fa672af8b modulemanager: Clear modulemap when a host is deactivated (thanks xnyhps) 14 years ago
Matthew Wild bcd870f7d3 modulemanager: Set module.environment before calling add_host, otherwise the module will get the parent's environment (thanks xnyhps and Maranda) 14 years ago
Matthew Wild 566fc32a4e modulemanager: Set module.loaded = false on unload 14 years ago
Matthew Wild c4ff9b7e10 modulemanager: Report errors that happen when loading a shared module onto its original host 14 years ago
Matthew Wild 60b60d9c30 modulemanager: For children of shared modules, set module.environment to the empty environment for that module (useful to expose data or APIs at host.modules[module]) 14 years ago
Matthew Wild 0c6799c936 modulemanager: When a shared module becomes global, ensure it still gets loaded onto the original target host 14 years ago
Matthew Wild 1c88e91a19 modulemanager: Support for shared modules - function module.add_host(host_module) in a global module 14 years ago
Matthew Wild 800fd50ce0 modulemanager: Make module_has_method and module_call_method use rawget() 14 years ago
Matthew Wild 4664423a7b modulemanager: Use modulemap rather than hosts[host] (fix for when host == "*") 14 years ago
Matthew Wild 06c05a1916 modulemanager: Use api_instance rather than pluginenv.module (same thing) 14 years ago
Matthew Wild 28cb1b2a94 modulemanager: Allow loading a module onto "*" (part-fixes #228) 14 years ago
Matthew Wild e737bb93b7 modulemanager: Some refactoring. Deprecate module.host = "*", modules should call module:set_global() (which has been around since forever) 14 years ago
Matthew Wild aef2645ec8 modulemanager: Use appropriate events object for global modules when firing item-removed on unload 14 years ago
Florian Zeitz 0699ab44aa modulemanager: include mod_c2s and mod_s2s into autoloaded modules. 14 years ago
Matthew Wild 7780d6690a modulemanager: load(): Return and use the correct module object 14 years ago
Matthew Wild ef3a0660f4 modulemanager: Cleanup some unused variables, imports, whitespace and add a comment. 14 years ago
Matthew Wild f2a5abecac modulemanager, moduleapi: Replace hooks multitable with an event_handlers map stored in individual modules. Also adds module:hook_object_event() to hook events on any util.events compatible object. 14 years ago
Matthew Wild 4595904c75 modulemanager: Drop unnecessary prosody_events local 14 years ago
Matthew Wild 5ae5e9a1e5 modulemanager: Some reorganisation. Only external change is (should be) that module-unloaded and module-loaded are no longer fired when reloading a module, the new event module-reloaded is fired instead. 14 years ago
Matthew Wild 594d90204c modulemanager: Move in-module API functions to core.moduleapi (half the file size, yay) 14 years ago
Matthew Wild 054526af75 modulemanager: Remove 'config' from module environments (no modules use it that I'm aware of) 14 years ago
Waqas Hussain bdcd8a000a modulemanager: Fix undefined global access in handling of module.save error handling. 15 years ago
Waqas Hussain ab05b98bf1 modulemanager: Fixed undefined global access in broadcast of item-remove events on module unload. 15 years ago
Matthew Wild a0dff695d1 modulemanager: Add module:handle_items() to allow a module to more easily handle a list of items on a host 15 years ago
Matthew Wild 7a4fd8dbcb modulemanager: Add module:hook_global(name, handler, priority) to hook global (server-wide) events 15 years ago
Kim Alvefur d29b8f340a core.modulemanager, mod_disco: Add support for XEP-0128: Service Discovery Extensions 15 years ago
Waqas Hussain ad07e282a8 modulemanager: Added module.path to the plugin API to let plugins determine their load path. 15 years ago
Waqas Hussain e55a81dfae modulemanager: Added module.path to the plugin API to let plugins determine their load path. 15 years ago
Paul Aurich 78a80f36b5 modulemanager: Fix disabling a module on a single host 15 years ago
Waqas Hussain 1e5dc701c8 modulemanager: Removed an unused variable. 15 years ago
Waqas Hussain 62638e4fcd modulemanager: Removed an unused variable. 15 years ago
Waqas Hussain c23fedb91f modulemanager: Auto-load mod_offline. 15 years ago
Matthew Wild f0f0886c0d modulemanager, mod_console: Rename mod_console -> mod_admin_telnet - add compatibility code to modulemanager for existing configs 15 years ago
Waqas Hussain 109b7a0e12 modulemanager: Auto-load mod_offline. 15 years ago
Matthew Wild e4dcba9647 modulemanager, mod_console: Rename mod_console -> mod_admin_telnet - add compatibility code to modulemanager for existing configs 15 years ago
Waqas Hussain ebca6cbbd0 modulemanager: Allow components to inherit mod_iq. This allows modules loaded on components to hook IQ stanza sub-events ("iq-set/bare/xmlns:tag", etc). 15 years ago
Waqas Hussain 90006b5b11 modulemanager: Allow components to inherit mod_iq. This allows modules loaded on components to hook IQ stanza sub-events ("iq-set/bare/xmlns:tag", etc). 15 years ago
Matthew Wild a3aa9ad46c Backed out changeset bfc47564aaef (No need for _M with module.environment) 15 years ago
Matthew Wild 449a839205 modulemanager: Inside plugins, have global _M as a reference to the module's environment 15 years ago
Waqas Hussain 0bcc5e0ac7 modulemanager, usermanager: Removed hooks for the 'component-activated' event (components now fire 'host-activated'). 15 years ago
Waqas Hussain 557bad86f7 modulemanager: Return an error when loading a module on a non-existent host, don't create the host. Removes dependecy on componentmanager. 15 years ago
Waqas Hussain 24245b60d1 modulemanager: load_modules_for_host(): For components, the inherited modules are the intersection of the inheritable and global modules lists, not the difference. 15 years ago
Waqas Hussain 00a385a310 modulemanager: load_modules_for_host(): Inherit 'tls' and 'dialback' from global modules list for components, and load the component module. Also refactored to use util.set. 15 years ago
Waqas Hussain eba95643c9 modulemanager: Fixed: Locally defined pcall wasn't returning return values of the called function. 15 years ago
Waqas Hussain 67804ef1a3 componentmanager, hostmanager, modulemanager, mod_component: Got rid of the useless hosts[*].connected property. 15 years ago