forked from x/icebergs
opt some
This commit is contained in:
parent
158c738970
commit
4b4179bd04
@ -71,11 +71,15 @@ const PORTAL = "portal"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
PORTAL: {Name: "portal path auto", Help: "官网", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
PORTAL: {Name: "portal path auto", Help: "官网", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
||||||
|
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
aaa.White(m, ice.VAR_PORTAL)
|
||||||
|
}},
|
||||||
ctx.RUN: {Hand: func(m *ice.Message, arg ...string) {
|
ctx.RUN: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
if p := path.Join(ice.VAR_PORTAL, path.Join(arg...)); (m.Option(ice.DEBUG) == ice.TRUE || !nfs.ExistsFile(m, p)) && aaa.Right(m.Spawn(), arg) {
|
if p := path.Join(ice.VAR_PORTAL, path.Join(arg...)); (m.Option(ice.DEBUG) == ice.TRUE || !nfs.ExistsFile(m, p)) && aaa.Right(m.Spawn(), arg) {
|
||||||
ctx.Run(m, arg...)
|
ctx.Run(m, arg...)
|
||||||
m.Cmd(nfs.SAVE, p, ice.Maps{nfs.CONTENT: m.FormatsMeta(nil), nfs.DIR_ROOT: ""})
|
m.Cmd(nfs.SAVE, p, ice.Maps{nfs.CONTENT: m.FormatsMeta(nil), nfs.DIR_ROOT: ""})
|
||||||
} else {
|
} else {
|
||||||
|
m.Option(ice.MSG_USERROLE, aaa.TECH)
|
||||||
m.Copy(m.Spawn([]byte(m.Cmdx(nfs.CAT, p))))
|
m.Copy(m.Spawn([]byte(m.Cmdx(nfs.CAT, p))))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user