1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-04 10:16:50 +08:00
parent 2f34511460
commit 6c66c0ece4
2 changed files with 5 additions and 2 deletions

View File

@ -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||"")

View File

@ -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)