Commit Graph

41 Commits (51549fe050a1aec00284d1e2599c93010bc763c2)

Author SHA1 Message Date
Florian Zeitz 1d833bb807 Remove all trailing whitespace 13 years ago
Matthew Wild c8e0c8a63b moduleapi: module:get_host_type() now returns 'global' for * and 'local' for non-components 13 years ago
Kim Alvefur d9bff06d21 moduleapi: in module:provides(), add the name of the module in item._provided_by 13 years ago
Kim Alvefur 7ad8f743bb moduleapi: module:provides called without an item makes a copy of the environment instead. Fixes warnings about non-existent globals 13 years ago
Matthew Wild bcc1074dd5 moduleapi: Add module:get_option_inherited_set() to return a set that inherits items from a globally set set, if set 13 years ago
Matthew Wild 82faa21dd3 moduleapi: Add module:context(host) to produce a fake API context for a given host (or global). module:context("*"):get_option("foo") to get global options. 13 years ago
Kim Alvefur cde9a24132 moduleapi: Make module:open_store() open a store named after the calling module by default 13 years ago
Matthew Wild 81216b737e moduleapi: Add module:open_store() as a front-end to storagemanager.open() 13 years ago
Matthew Wild 401fb29994 moduleapi: assert() that prosody.core_post_stanza is not nil 13 years ago
Marco Cirillo fd14557245 moduleapi: have get_host_items wrap on get_items from modulemanager, also add has_{feature/identity} to the API. 13 years ago
Kim Alvefur 1acfdf5914 core.*: Complete removal of all traces of the "core" section and section-related code. 13 years ago
Matthew Wild 8279c2cf00 moduleapi: Revert previous commit and add comment, it's meant to be this way 13 years ago
Matthew Wild 223d37a9d0 moduleapi: Fix require of modulemanager (thanks mva!) 13 years ago
Matthew Wild 537e1447c2 moduleapi: Clarify comment 14 years ago
Matthew Wild dfd02c4577 moduleapi: If path name ends with '-cache' create table as weak (keys and values) 14 years ago
Matthew Wild 9f5ddb8708 moduleapi: Remove unused import of util.multitable 14 years ago
Florian Zeitz d49b9bc2ab Eliminate direct setfenv usage 14 years ago
Matthew Wild 28e56af503 modulemanager, moduleapi: Turn module.event_handlers into a multitable and track object->event->handler associations correctly (thanks Zash) 14 years ago
Matthew Wild 0fe909f995 moduleapi, modulemanager: Re-structure module.event_handlers so that the same handler can harmlessly handle multiple events (thanks Zash) 14 years ago
Matthew Wild 8284f0b825 moduleapi: Don't auto-reload self when already reloading (fixes reload of modules with cyclic dependencies) 14 years ago
Matthew Wild 570492f627 moduleapi: Add module:get_directory() to get module file's directory, and module:load_resource() to load a file relative to that directory 14 years ago
Matthew Wild e25c402ab0 moduleapi: Import util.timer 14 years ago
Matthew Wild e47a14da07 moduleapi: Remove unused variable 'module_items' 14 years ago
Matthew Wild 1565fe93a2 moduleapi: Rename module:hook_stanza() -> module:hook_tag() (hook_stanza works for compat) 14 years ago
Matthew Wild ba7525b97a moduleapi: get_host_type(): Return nil for global modules (no host) 14 years ago
Matthew Wild 898ec7a5cf moduleapi: Fix parameters to unhook_object_event() 14 years ago
Matthew Wild 45aab93d28 moduleapi: module:depends(): Don't load shared modules onto the current host if the current host is '*'... 14 years ago
Matthew Wild a7a3128818 moduleapi: Add module:unhook_object_event() 14 years ago
Matthew Wild b6a2692f3f moduleapi: Add module:add_timer(delay, callback) - automatically halts the timer on module unload 14 years ago
Matthew Wild 33ffda321d moduleapi: module:depends(): Load shared modules onto the current host even if they are loaded globally already 14 years ago
Matthew Wild de1168f288 moduleapi: module:provides(): Add "-provider" onto the key name 14 years ago
Matthew Wild 5b5c8c83b3 moduleapi: module:provides(): Fix usage of wrong table 14 years ago
Matthew Wild 2d05356905 moduleapi: Have modules internally store a reference to shared tables they use, to ensure they don't get collected while any module that had access to that table is still loaded (thanks Zash) 14 years ago
Matthew Wild 78cd9a0ddc moduleapi: Add module:send() as an alias for core_post_stanza() from the current host's origin 14 years ago
Matthew Wild 775261ef27 moduleapi: Add module:provides(), a shortcut to add an item with the current module's name 14 years ago
Matthew Wild 2c3103e84a moduleapi: Set module.global = true when module:set_global() is called 14 years ago
Matthew Wild 7c5700ac54 moduleapi: Add module:shared(), a way to easily share data between multiple loaded modules 14 years ago
Matthew Wild 2f397255c2 moduleapi: Add module:depends(), a way to safely depend upon another module at runtime 14 years ago
Matthew Wild 15a0736720 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 36542853ef modulemanager: Move in-module API functions to core.moduleapi (half the file size, yay) 14 years ago