diff --git a/panel/action.js b/panel/action.js index a6c828b6..e51b9b43 100644 --- a/panel/action.js +++ b/panel/action.js @@ -167,7 +167,10 @@ Volcanos(chat.ONEXPORT, { Volcanos(chat.ONENGINE, {_engine: function(event, sup, msg, can, cmds, cb) { var storm = can.core.Value(can._root, can.core.Keys(chat.RIVER, cmds[0], chat.STORM, cmds[1])); if (!storm || cmds.length != 2) { return false } if (storm.index) { - can.runAction(event, ctx.COMMAND, [].concat(can.core.List(storm.index, function(item) { return item.index||item })), function(msg) { + can.runAction(event, ctx.COMMAND, [].concat(can.core.List(storm.index, function(item) { + if (typeof item == code.FUNCTION) { item = item(can) } + if (item) { return item.index||item } + })), function(msg) { can.core.List(storm.index, function(item) { msg.Push(ctx.ARGS, JSON.stringify(item.args||[])).Push(ctx.STYLE, item.style||"").Push(ctx.DISPLAY, item.display||"") msg.Push(web.SPACE, item.space||"") diff --git a/panel/header.js b/panel/header.js index 1b379edd..66bbe876 100644 --- a/panel/header.js +++ b/panel/header.js @@ -89,7 +89,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {}, msg.Option(mdb.PLUGIN) && can.onappend.plugin(can, {index: msg.Option(mdb.PLUGIN)}, function(sub) { can.onmotion.hidden(can, sub._target) }, document.body) msg.Option(nfs.SCRIPT) && can.require(can.base.Obj(msg.Option(nfs.SCRIPT)), function(can) { can.onaction.source(can, msg) }) var tool = can._root.Action._conf.tool - if (tool && tool[0]._role == ice.OK && tool.index != web.CHAT_GRANT) { return show(msg) } + if (tool && tool[0]._role == ice.OK && tool[0].index != web.CHAT_GRANT || can.misc.Search(can, web.SHARE)) { return show(msg) } if (!can.Conf(aaa.USERNICK, (msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)).slice(0, 8))) { return can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg) } show(msg)