Software /
code /
prosody-modules
File
mod_adhoc/adhoc/adhoc.lib.lua @ 119:e6592d8305cb
mod_muc_log_http: support next, previous day calculations from one month/year to the next or visa versa
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Fri, 15 Jan 2010 09:58:21 +0100 |
parent | 43:adc9eff8adb2 |
child | 121: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;