aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 00b2ae16..8479284d 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -693,4 +693,9 @@ function api:may(action, context, peek)
end
end
+-- Execute a function, once, but only after startup is complete
+function api:once(f)
+ return prosody.started:next(f);
+end
+
return api;