mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt some
This commit is contained in:
parent
84ae0c28fa
commit
e4a7ad0f2d
@ -45,7 +45,7 @@ func _user_search(m *ice.Message, name, text string) {
|
|||||||
|
|
||||||
func UserRoot(m *ice.Message, arg ...string) { // password username userrole
|
func UserRoot(m *ice.Message, arg ...string) { // password username userrole
|
||||||
userrole := kit.Select(ROOT, arg, 2)
|
userrole := kit.Select(ROOT, arg, 2)
|
||||||
username := kit.Select(ice.Info.UserName, arg, 1)
|
username := kit.Select(kit.Select("shy", ice.Info.UserName), arg, 1)
|
||||||
m.Option(ice.MSG_USERROLE, userrole)
|
m.Option(ice.MSG_USERROLE, userrole)
|
||||||
m.Option(ice.MSG_USERNAME, username)
|
m.Option(ice.MSG_USERNAME, username)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ func _system_cmd(m *ice.Message, arg ...string) *exec.Cmd {
|
|||||||
if file := _system_find(m, arg[0], strings.Split(env[i+1], ice.DF)...); file != "" {
|
if file := _system_find(m, arg[0], strings.Split(env[i+1], ice.DF)...); file != "" {
|
||||||
m.Debug("cmd: %v", file)
|
m.Debug("cmd: %v", file)
|
||||||
cmd.Path = file
|
cmd.Path = file
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,7 +45,6 @@ func _system_cmd(m *ice.Message, arg ...string) *exec.Cmd {
|
|||||||
if file := _system_find(m, arg[0], strings.Split(string(buf), ice.NL)...); file != "" {
|
if file := _system_find(m, arg[0], strings.Split(string(buf), ice.NL)...); file != "" {
|
||||||
// m.Debug("cmd: %v", file)
|
// m.Debug("cmd: %v", file)
|
||||||
// cmd.Path = file
|
// cmd.Path = file
|
||||||
// break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.Debug("cmd: %v", cmd.Path)
|
m.Debug("cmd: %v", cmd.Path)
|
||||||
|
@ -180,6 +180,7 @@ func _serve_login(msg *ice.Message, key string, cmds []string, w http.ResponseWr
|
|||||||
|
|
||||||
if msg.Option(ice.MSG_USERNAME) == "" && msg.Config(tcp.LOCALHOST) == ice.TRUE && tcp.IsLocalHost(msg, msg.Option(ice.MSG_USERIP)) {
|
if msg.Option(ice.MSG_USERNAME) == "" && msg.Config(tcp.LOCALHOST) == ice.TRUE && tcp.IsLocalHost(msg, msg.Option(ice.MSG_USERIP)) {
|
||||||
aaa.UserRoot(msg) // 主机认证
|
aaa.UserRoot(msg) // 主机认证
|
||||||
|
msg.Debug("what %v", msg.FormatMeta())
|
||||||
}
|
}
|
||||||
|
|
||||||
if msg.Option(ice.MSG_USERNAME) == "" && msg.Option(SHARE) != "" {
|
if msg.Option(ice.MSG_USERNAME) == "" && msg.Option(SHARE) != "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user