Software / code / prosody
Comparison
plugins/mod_csi.lua @ 13070:be9ac41f1619
mod_csi: Remove module status, doesn't work because of mod_smacks
This was meant to warn in case you had only mod_csi without a logic
handling module like mod_csi_simple by checking if anything hooked this
event, however mod_smacks also hooks this event and so this isn't really
a useful way of detecting this condition.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 10 Apr 2023 13:50:09 +0200 |
| parent | 13026:a97f4b277221 |
| child | 13075:82980f6890cd |
comparison
equal
deleted
inserted
replaced
| 13069:45caa4e43775 | 13070:be9ac41f1619 |
|---|---|
| 22 end; | 22 end; |
| 23 end | 23 end |
| 24 | 24 |
| 25 module:hook("stanza/"..xmlns_csi..":active", refire_event("csi-client-active")); | 25 module:hook("stanza/"..xmlns_csi..":active", refire_event("csi-client-active")); |
| 26 module:hook("stanza/"..xmlns_csi..":inactive", refire_event("csi-client-inactive")); | 26 module:hook("stanza/"..xmlns_csi..":inactive", refire_event("csi-client-inactive")); |
| 27 | |
| 28 function module.load() | |
| 29 if prosody.hosts[module.host].events._handlers["csi-client-active"] then | |
| 30 csi_handler_available = true; | |
| 31 module:set_status("core", "CSI handler module loaded"); | |
| 32 else | |
| 33 csi_handler_available = false; | |
| 34 module:set_status("warn", "No CSI handler module loaded"); | |
| 35 end | |
| 36 end | |
| 37 module:hook("module-loaded", module.load); | |
| 38 module:hook("module-unloaded", module.load); |