1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shaoying 2020-06-22 15:22:53 +08:00
parent fb008449c7
commit d4da81ce94
4 changed files with 34 additions and 6 deletions

View File

@ -1,3 +1,18 @@
package shy
import ()
import (
_ "github.com/shylinux/icebergs/base/aaa"
_ "github.com/shylinux/icebergs/base/cli"
_ "github.com/shylinux/icebergs/base/ctx"
_ "github.com/shylinux/icebergs/base/web"
_ "github.com/shylinux/icebergs/base/gdb"
_ "github.com/shylinux/icebergs/base/lex"
_ "github.com/shylinux/icebergs/base/log"
_ "github.com/shylinux/icebergs/base/yac"
_ "github.com/shylinux/icebergs/base/mdb"
_ "github.com/shylinux/icebergs/base/nfs"
_ "github.com/shylinux/icebergs/base/ssh"
_ "github.com/shylinux/icebergs/base/tcp"
)

View File

@ -119,9 +119,10 @@ func _space_send(m *ice.Message, space string, arg ...string) {
func _space_echo(msg *ice.Message, source, target []string, c *websocket.Conn, name string) {
msg.Optionv(ice.MSG_SOURCE, source)
msg.Optionv(ice.MSG_TARGET, target)
c.WriteMessage(1, []byte(msg.Format("meta")))
e := c.WriteMessage(1, []byte(msg.Format("meta")))
msg.Assert(e)
target = append([]string{name}, target...)
msg.Info("send %v %v->%v %v %v", 1, source, target, msg.Detailv(), msg.Format("meta"))
msg.Log("send", "%v->%v %v %v", source, target, msg.Detailv(), msg.Format("meta"))
}
func _space_exec(msg *ice.Message, source, target []string, c *websocket.Conn, name string) {
msg = msg.Cmd()
@ -138,7 +139,7 @@ func _space_handle(m *ice.Message, safe bool, send map[string]*ice.Message, c *w
socket, msg := c, m.Spawns(b)
target := kit.Simple(msg.Optionv(ice.MSG_TARGET))
source := kit.Simple(msg.Optionv(ice.MSG_SOURCE), name)
msg.Info("recv %v<-%v %s %v", target, source, msg.Detailv(), msg.Format("meta"))
msg.Log("recv", "%v<-%v %s %v", target, source, msg.Detailv(), msg.Format("meta"))
if len(target) == 0 {
msg.Option(ice.MSG_USERROLE, aaa.UserRole(msg, msg.Option(ice.MSG_USERNAME)))

View File

@ -1,3 +1,9 @@
package shy
import ()
import (
_ "github.com/shylinux/icebergs/core/chat"
_ "github.com/shylinux/icebergs/core/code"
_ "github.com/shylinux/icebergs/core/mall"
_ "github.com/shylinux/icebergs/core/team"
_ "github.com/shylinux/icebergs/core/wiki"
)

View File

@ -1,3 +1,9 @@
package misc
import ()
import (
_ "github.com/shylinux/icebergs/misc/docker"
_ "github.com/shylinux/icebergs/misc/git"
_ "github.com/shylinux/icebergs/misc/tmux"
_ "github.com/shylinux/icebergs/misc/vim"
_ "github.com/shylinux/icebergs/misc/zsh"
)