1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2021-10-24 16:49:59 +08:00
parent 5e5fa5e764
commit d76b7064d4
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,9 @@ Volcanos("misc", {help: "通信协议", Message: function(event, can) { var msg
Copy: function(res) { if (!res) { return msg }
res.result && (msg.result = (msg.result||[]).concat(res.result))
res.append && (msg.append = res.append) && res.append.forEach(function(item) {
var i = msg.option && msg.option.indexOf(item); if (i > -1) {
msg.option[i] = "", delete(msg[item])
}
res[item] && (msg[item] = (msg[item]||[]).concat(res[item]))
})
res.option && (msg.option = res.option) && res.option.forEach(function(item) {

View File

@ -85,7 +85,7 @@ Volcanos("onaction", {help: "交互操作", list: [cli.CLEAR, cli.CLOSE, cli.DON
plugin: function(event, can, index) { var line = can.list[index]
if (can.base.isFunc(line.text)) { return can.onmotion.hide(can), line.text(event) }
var cmd = line.cmd == "command"? can.core.Keys(line.text, line.name): can.core.Keys(line.ctx, line.cmd)
var cmd = line.cmd == "command"? can.core.Keys(line.type, line.name.split(" ")[0]): can.core.Keys(line.ctx, line.cmd)
can.onappend.plugin(can, {type: chat.PLUGIN, index: cmd||msg.Option(kit.MDB_INDEX)}, function(sub, meta) {
can.search({}, "Action.onexport.size", function(msg, width) { sub.Conf(chat.WIDTH, width-60) })