diff --git a/base/cli/cli.go b/base/cli/cli.go index 03361877..fb47c5c2 100644 --- a/base/cli/cli.go +++ b/base/cli/cli.go @@ -94,6 +94,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块", RUNTIME: {Name: "runtime", Help: "运行环境", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { switch kit.Select("", arg, 0) { + case "hostinfo": case "hostname": m.Conf(RUNTIME, "boot.hostname", arg[1]) HostName = arg[1] diff --git a/core/wiki/word.go b/core/wiki/word.go index a15e2a8c..195c777b 100644 --- a/core/wiki/word.go +++ b/core/wiki/word.go @@ -211,7 +211,7 @@ func _order_show(m *ice.Message, name, text string, arg ...string) { func _table_show(m *ice.Message, name, text string, arg ...string) { head, list := []string{}, [][]string{} for i, v := range kit.Split(strings.TrimSpace(text), "\n") { - if i == 0 { + if v = strings.ReplaceAll(v, "%", "%%"); i == 0 { head = kit.Split(v) } else { line := kit.Split(v)