Mercurial > prosody-modules
view mod_adhoc/adhoc/adhoc.lib.lua @ 85:83494de806a4
mod_muc_log: Do not log other muc-component's rooms then the module was loaded for. Do neither log nor provide access to possible existing log if a room is private. (thx flo for spotting this)
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Sun, 08 Nov 2009 18:35:53 +0100 |
parents | adc9eff8adb2 |
children | a9898f13c89e |
line wrap: on
line source
local st = require "util.stanza"; local xmlns_cmd = "http://jabber.org/protocol/commands"; local _M = {}; function _cmdtag(desc, status, sessionid, action) local cmd = st.stanza("command", { xmlns = xmlns_cmd, node = desc.node, status = status }); if sessionid then cmd.attr.sessionid = sessionid; end if action then cmd.attr.action = action; end return cmd; end function _M.new(name, node, handler, permission) return { name = name, node = node, handler = handler, cmdtag = _cmdtag, permission = (permission or "user") }; end return _M;