forked from x/icebergs
add fileline
This commit is contained in:
parent
5d6a489bd4
commit
946b30a364
@ -264,10 +264,10 @@ func _story_catch(m *ice.Message, arg ...string) {
|
||||
_story_add(m, arg...)
|
||||
}
|
||||
func _story_add(m *ice.Message, arg ...string) {
|
||||
if arg[3] == "" || m.Richs(ice.WEB_CACHE, nil, arg[3], func(key string, value map[string]interface{}) {
|
||||
if len(arg) > 3 && (arg[3] == "" || m.Richs(ice.WEB_CACHE, nil, arg[3], func(key string, value map[string]interface{}) {
|
||||
// 复用缓存
|
||||
arg[3] = key
|
||||
}) == nil {
|
||||
}) == nil) {
|
||||
// 添加缓存
|
||||
m.Cmdy(ice.WEB_CACHE, arg)
|
||||
arg = []string{arg[0], m.Append("type"), m.Append("name"), m.Append("data")}
|
||||
|
@ -187,6 +187,10 @@ var Index = &ice.Context{Name: "chat", Help: "聊天中心",
|
||||
|
||||
// 登录检查
|
||||
if m.Warn(!m.Options(ice.MSG_USERNAME), "not login") {
|
||||
if m.Option("share") != "" {
|
||||
m.Option(ice.MSG_USERNAME, "void")
|
||||
return
|
||||
}
|
||||
m.Render("status", 401, "not login")
|
||||
m.Option(ice.MSG_USERURL, "")
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user