Software /
code /
prosody
Comparison
plugins/mod_uptime.lua @ 10565:421b2f8369fd
mod_adhoc: Improve permission setting (fix #1482) BC
Rename 'user' permission mode to 'any' for clarity, too easily mistaken
for what the 'local_user' setting does.
It is also removed as a default and made a required argument.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Dec 2019 22:47:34 +0100 |
parent | 9572:867e40b82409 |
child | 10749:abbdf72b0710 |
comparison
equal
deleted
inserted
replaced
10564:3098eac31139 | 10565:421b2f8369fd |
---|---|
40 | 40 |
41 function uptime_command_handler () | 41 function uptime_command_handler () |
42 return { info = uptime_text(), status = "completed" }; | 42 return { info = uptime_text(), status = "completed" }; |
43 end | 43 end |
44 | 44 |
45 local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler); | 45 local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler, "any"); |
46 | 46 |
47 module:provides("adhoc", descriptor); | 47 module:provides("adhoc", descriptor); |