1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-05-05 23:24:50 +08:00
parent 555b91fa8f
commit b8c8d1603e
3 changed files with 18 additions and 4 deletions

View File

@ -84,12 +84,24 @@ func init() {
parse := func(str string) int64 { port, _ := strconv.ParseInt(str, 16, 32); return port }
trans := func(str string) string {
switch str {
case "0A":
return "LISTEN"
case "01":
return "ESTABLISHED"
case "02":
return "TCP_SYNC_SEND"
case "03":
return "TCP_SYNC_RECV"
case "04":
return "TCP_FIN_WAIT1"
case "05":
return "TCP_FIN_WAIT2"
case "06":
return "TIME_WAIT"
case "07":
return "TCP_CLOSE"
case "08":
return "TCP_CLOSE_WAIT"
case "0A":
return "LISTEN"
default:
return str
}
@ -111,7 +123,7 @@ func init() {
ls = kit.Split(value["remote_address"], ":")
m.Push("remote", kit.Format("%d.%d.%d.%d:%d", parse(ls[0][30:32]), parse(ls[0][28:30]), parse(ls[0][26:28]), parse(ls[0][24:26]), parse(ls[1])))
})
m.Sort("status,local").StatusTimeCount(stats)
m.Sort("status,local", []string{"LISTEN", "ESTABLISHED", "TIME_WAIT"}).StatusTimeCount(stats)
}},
nfs.TRASH: {Hand: func(m *ice.Message, arg ...string) {
m.Assert(m.Option(PORT) != "")

View File

@ -20,6 +20,8 @@ import (
func _inner_list(m *ice.Message, ext, file, dir string) {
file = kit.Split(file, "?")[0]
kit.If(aaa.Right(m, dir, file), func() {
m.Cmdy(nfs.CAT, path.Join(dir, file))
return
kit.If(nfs.IsSourceFile(m, ext), func() {
m.Cmdy(nfs.CAT, path.Join(dir, file))
}, func() {

View File

@ -64,7 +64,7 @@ func init() {
m.ProcessInner()
}
}},
}, chat.FavorAction(), WikiAction("", "png|PNG|jpg|JPG|jpeg|mp4|m4v|mov|MOV|webm")), Hand: func(m *ice.Message, arg ...string) {
}, chat.FavorAction(), WikiAction("", "ico|png|PNG|jpg|JPG|jpeg|mp4|m4v|mov|MOV|webm")), Hand: func(m *ice.Message, arg ...string) {
_wiki_list(m.Options(nfs.DIR_ROOT, _feel_path(m, "")), kit.Slice(arg, 0, 1)...)
ctx.DisplayLocal(m, "")
}},