mirror of
https://shylinux.com/x/icebergs
synced 2025-04-27 01:48:27 +08:00
18 lines
535 B
Go
18 lines
535 B
Go
package ctx
|
|
|
|
import (
|
|
ice "github.com/shylinux/icebergs"
|
|
"github.com/shylinux/icebergs/base/mdb"
|
|
)
|
|
|
|
const CTX = "ctx"
|
|
|
|
var Index = &ice.Context{Name: CTX, Help: "标准模块", Commands: map[string]*ice.Command{
|
|
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
|
m.Cmd(mdb.SEARCH, mdb.CREATE, COMMAND, m.Prefix(COMMAND))
|
|
}},
|
|
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
|
|
}}
|
|
|
|
func init() { ice.Index.Register(Index, nil, CONTEXT, COMMAND, CONFIG) }
|