mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
add some
This commit is contained in:
parent
be66627287
commit
473826664a
@ -105,7 +105,7 @@ func UserRoot(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
userzone := kit.Select(ice.OPS, arg, 4)
|
userzone := kit.Select(ice.OPS, arg, 4)
|
||||||
email := kit.Select(UserEmail(m, username), arg, 5)
|
email := kit.Select(UserEmail(m, username), arg, 5)
|
||||||
if len(arg) > 0 {
|
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)
|
m.Cmd(USER, mdb.CREATE, userrole, username, usernick, language, userzone, email)
|
||||||
}
|
}
|
||||||
return SessAuth(m, kit.Dict(USERROLE, userrole, USERNAME, username, USERNICK, usernick))
|
return SessAuth(m, kit.Dict(USERROLE, userrole, USERNAME, username, USERNICK, usernick))
|
||||||
|
@ -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.Username)
|
||||||
kit.HashSeed = append(kit.HashSeed, ice.Info.Hostname)
|
kit.HashSeed = append(kit.HashSeed, ice.Info.Hostname)
|
||||||
kit.HashSeed = append(kit.HashSeed, ice.Info.Pathname)
|
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.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()
|
ice.Info.Time = m.Time()
|
||||||
m.Conf(RUNTIME, kit.Keys(BOOT, mdb.TIME), ice.Info.Time)
|
m.Conf(RUNTIME, kit.Keys(BOOT, mdb.TIME), ice.Info.Time)
|
||||||
if runtime.GOARCH != MIPSLE {
|
if runtime.GOARCH != MIPSLE {
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func UserWeb(m *ice.Message) *url.URL {
|
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 {
|
func UserHost(m *ice.Message) string {
|
||||||
if p := m.Option(ice.MSG_USERHOST); p != "" {
|
if p := m.Option(ice.MSG_USERHOST); p != "" {
|
||||||
|
@ -89,11 +89,12 @@ func init() {
|
|||||||
origin := SpideOrigin(m, arg[0])
|
origin := SpideOrigin(m, arg[0])
|
||||||
kit.If(origin == "", func() { arg[0], origin, dream = ice.DEV, arg[0], arg[0]+dream })
|
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(), append(m.Cmds(tcp.HOST).Appendv(aaa.IP), tcp.LOCALHOST)...) {
|
||||||
if kit.IsIn(kit.ParseURL(origin).Hostname(), tcp.LOCALHOST) {
|
// if kit.IsIn(kit.ParseURL(origin).Hostname(), tcp.LOCALHOST) {
|
||||||
origin = m.Option(ice.MSG_USERHOST)
|
// origin = m.Option(ice.MSG_USERHOST)
|
||||||
} else {
|
// } else {
|
||||||
origin = tcp.PublishLocalhost(m, origin)
|
// origin = tcp.PublishLocalhost(m, origin)
|
||||||
}
|
// }
|
||||||
|
origin = tcp.PublishLocalhost(m, origin)
|
||||||
stat := map[string]int{}
|
stat := map[string]int{}
|
||||||
list := m.Spawn(ice.Maps{ice.MSG_FIELDS: ""}).CmdMap(SPACE, mdb.NAME)
|
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) {
|
m.SetAppend().Spawn().SplitIndex(m.Cmdx(SPIDE, arg[0], dream, kit.Dict(mdb.ConfigSimple(m, CLIENT_TIMEOUT)))).Table(func(value ice.Maps) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user