package gonganxitong import ( "shylinux.com/x/ice" "shylinux.com/x/icebergs/base/aaa" "shylinux.com/x/icebergs/base/web" kit "shylinux.com/x/toolkits" "shylinux.com/x/community/src/gonganxitong/model" ) type sess struct { Table user user create string `name:"create user_uid*"` } func (s sess) Create(m *ice.Message, arg ...string) { s.Insert(m, model.USER_UID, m.Option(model.USER_UID), web.AGENT, m.Option(ice.MSG_USERUA), aaa.IP, m.Option(ice.MSG_USERIP)) m.ProcessCookie(ice.MSG_SESSID, kit.JoinWord(web.SPACE, m.Option(ice.MSG_USERPOD), m.PrefixKey(), aaa.CHECK, m.Result()), "-2") } func (s sess) Check(m *ice.Message, arg ...string) { msg := s.Select(m.Spawn(), model.UID, arg[0]) msg = m.Cmd(s.user, s.Select, model.UID, msg.Append(model.USER_UID)) m.Option(ice.MSG_USERROLE, aaa.VOID) m.Option(ice.MSG_USERNAME, msg.Append(model.UID)) m.Option(ice.MSG_USERNICK, msg.Append(model.NAME)) m.Option(ice.MSG_AVATAR, msg.Append(model.AVATAR)) m.Option(model.USER_UID, msg.Append(model.UID)) } func init() { ice.TeamCtxCmd(sess{}) }