1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-02-25 12:14:41 +08:00
parent be66627287
commit 473826664a
4 changed files with 11 additions and 9 deletions

View File

@ -105,7 +105,7 @@ func UserRoot(m *ice.Message, arg ...string) *ice.Message {
userzone := kit.Select(ice.OPS, arg, 4)
email := kit.Select(UserEmail(m, username), arg, 5)
if len(arg) > 0 {
ice.Info.Username = username
kit.If(username != ROOT, func() { ice.Info.Username = username })
m.Cmd(USER, mdb.CREATE, userrole, username, usernick, language, userzone, email)
}
return SessAuth(m, kit.Dict(USERROLE, userrole, USERNAME, username, USERNICK, usernick))

View File

@ -43,9 +43,10 @@ func _runtime_init(m *ice.Message) {
kit.HashSeed = append(kit.HashSeed, ice.Info.Username)
kit.HashSeed = append(kit.HashSeed, ice.Info.Hostname)
kit.HashSeed = append(kit.HashSeed, ice.Info.Pathname)
aaa.UserRoot(ice.Pulse, aaa.ROOT, aaa.ROOT)
aaa.UserRoot(ice.Pulse, aaa.TECH, ice.Info.Make.Author, "", "", ice.DEV, ice.Info.Make.Email)
aaa.UserRoot(ice.Pulse, aaa.TECH, ice.Info.Make.Username, "", "", ice.DEV, ice.Info.Make.Email)
aaa.UserRoot(ice.Pulse, aaa.TECH, ice.Info.Username)
aaa.UserRoot(ice.Pulse, aaa.ROOT, ice.Info.Username)
aaa.UserRoot(ice.Pulse, aaa.ROOT, aaa.ROOT)
ice.Info.Time = m.Time()
m.Conf(RUNTIME, kit.Keys(BOOT, mdb.TIME), ice.Info.Time)
if runtime.GOARCH != MIPSLE {

View File

@ -15,7 +15,7 @@ import (
)
func UserWeb(m *ice.Message) *url.URL {
return kit.ParseURL(m.Option(ice.MSG_USERWEB))
return kit.ParseURL(m.OptionDefault(ice.MSG_USERWEB, "http://localhost:9020"))
}
func UserHost(m *ice.Message) string {
if p := m.Option(ice.MSG_USERHOST); p != "" {

View File

@ -89,11 +89,12 @@ func init() {
origin := SpideOrigin(m, arg[0])
kit.If(origin == "", func() { arg[0], origin, dream = ice.DEV, arg[0], arg[0]+dream })
// if kit.IsIn(kit.ParseURL(origin).Hostname(), append(m.Cmds(tcp.HOST).Appendv(aaa.IP), tcp.LOCALHOST)...) {
if kit.IsIn(kit.ParseURL(origin).Hostname(), tcp.LOCALHOST) {
origin = m.Option(ice.MSG_USERHOST)
} else {
origin = tcp.PublishLocalhost(m, origin)
}
// if kit.IsIn(kit.ParseURL(origin).Hostname(), tcp.LOCALHOST) {
// origin = m.Option(ice.MSG_USERHOST)
// } else {
// origin = tcp.PublishLocalhost(m, origin)
// }
origin = tcp.PublishLocalhost(m, origin)
stat := map[string]int{}
list := m.Spawn(ice.Maps{ice.MSG_FIELDS: ""}).CmdMap(SPACE, mdb.NAME)
m.SetAppend().Spawn().SplitIndex(m.Cmdx(SPIDE, arg[0], dream, kit.Dict(mdb.ConfigSimple(m, CLIENT_TIMEOUT)))).Table(func(value ice.Maps) {