mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt chat
This commit is contained in:
parent
11b8bfd6be
commit
441013508b
@ -66,6 +66,7 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
CHECK: {Name: "check sessid", Help: "检查", Hand: func(m *ice.Message, arg ...string) {
|
CHECK: {Name: "check sessid", Help: "检查", Hand: func(m *ice.Message, arg ...string) {
|
||||||
_sess_check(m, m.Option(SESSID))
|
_sess_check(m, m.Option(SESSID))
|
||||||
|
m.Debug("what %v", m.FormatsMeta())
|
||||||
}},
|
}},
|
||||||
}, mdb.HashAction(mdb.SHORT, mdb.UNIQ, mdb.FIELD, "time,hash,userrole,username,usernick,ip,ua", mdb.EXPIRE, "720h"))},
|
}, mdb.HashAction(mdb.SHORT, mdb.UNIQ, mdb.FIELD, "time,hash,userrole,username,usernick,ip,ua", mdb.EXPIRE, "720h"))},
|
||||||
})
|
})
|
||||||
|
@ -280,6 +280,7 @@ func _serve_handle(key string, cmd *ice.Command, msg *ice.Message, w http.Respon
|
|||||||
}
|
}
|
||||||
func _serve_login(msg *ice.Message, key string, cmds []string, w http.ResponseWriter, r *http.Request) ([]string, bool) {
|
func _serve_login(msg *ice.Message, key string, cmds []string, w http.ResponseWriter, r *http.Request) ([]string, bool) {
|
||||||
aaa.SessCheck(msg, msg.Option(ice.MSG_SESSID)) // 会话认证
|
aaa.SessCheck(msg, msg.Option(ice.MSG_SESSID)) // 会话认证
|
||||||
|
msg.Debug("what %v", msg.FormatsMeta())
|
||||||
|
|
||||||
if msg.Config("staffname") != "" {
|
if msg.Config("staffname") != "" {
|
||||||
aaa.UserLogin(msg, r.Header.Get("Staffname"), "")
|
aaa.UserLogin(msg, r.Header.Get("Staffname"), "")
|
||||||
|
@ -37,7 +37,7 @@ func init() {
|
|||||||
m.Option(aaa.USERNAME, msg.Append("data.open_id"))
|
m.Option(aaa.USERNAME, msg.Append("data.open_id"))
|
||||||
msg = m.Cmd(EMPLOYEE, appid, m.Option(aaa.USERNAME))
|
msg = m.Cmd(EMPLOYEE, appid, m.Option(aaa.USERNAME))
|
||||||
userrole := kit.Select(aaa.VOID, aaa.TECH, msg.Append("is_tenant_manager") == ice.TRUE)
|
userrole := kit.Select(aaa.VOID, aaa.TECH, msg.Append("is_tenant_manager") == ice.TRUE)
|
||||||
m.Cmd(aaa.USER, mdb.CREATE, userrole, m.Option(aaa.USERNAME))
|
m.Cmd(aaa.USER, mdb.CREATE, m.Option(aaa.USERNAME), "", userrole)
|
||||||
m.Cmd(aaa.USER, mdb.MODIFY, aaa.USERROLE, userrole,
|
m.Cmd(aaa.USER, mdb.MODIFY, aaa.USERROLE, userrole,
|
||||||
aaa.USERNICK, msg.Append(mdb.NAME), aaa.USERZONE, LARK,
|
aaa.USERNICK, msg.Append(mdb.NAME), aaa.USERZONE, LARK,
|
||||||
aaa.AVATAR, msg.Append("avatar_url"), aaa.GENDER, kit.Select("女", "男", msg.Append(aaa.GENDER) == "1"),
|
aaa.AVATAR, msg.Append("avatar_url"), aaa.GENDER, kit.Select("女", "男", msg.Append(aaa.GENDER) == "1"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user