From 7bdc1bc3804683ae7f1ca3c5e5cfe448ca8f5a4e Mon Sep 17 00:00:00 2001 From: shy Date: Sun, 24 Dec 2023 12:23:12 +0800 Subject: [PATCH] add can.dir --- core/chat/location/tmap.go | 3 +++ core/code/xterm.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/chat/location/tmap.go b/core/chat/location/tmap.go index 59a931d6..b3c408a2 100644 --- a/core/chat/location/tmap.go +++ b/core/chat/location/tmap.go @@ -41,6 +41,9 @@ func init() { m.Echo(get(m, "place/v1/explore", m.OptionSimple("keyword,boundary,page_index"))) }}, SEARCH: {Help: "搜索", Hand: func(m *ice.Message, arg ...string) { + if m.Option("keyword") == "" { + return + } m.Echo(get(m, "place/v1/search", m.OptionSimple("keyword,boundary,page_index"))) }}, DIRECTION: {Help: "导航", Hand: func(m *ice.Message, arg ...string) { diff --git a/core/code/xterm.go b/core/code/xterm.go index a497d3a6..ec321e37 100644 --- a/core/code/xterm.go +++ b/core/code/xterm.go @@ -55,7 +55,7 @@ func _xterm_get(m *ice.Message, h string) xterm.XTerm { } func _xterm_echo(m *ice.Message, h string, str string) { m.Options(ice.MSG_DAEMON, mdb.HashSelectField(m, h, cli.DAEMON), ice.MSG_COUNT, "0", "__target", "") - m.Options(ice.LOG_DISABLE, ice.TRUE) + // m.Options(ice.LOG_DISABLE, ice.TRUE) web.PushNoticeGrow(m, h, str) } func _xterm_cmds(m *ice.Message, h string, cmd string, arg ...ice.Any) {