package main import "biukop.com/sfm/loan" func WsNotifyNewLogin(ss *loan.Session) { msg := make(map[string]string) msg["T"] = "login" msg["Mid"] = apiV1GetMachineIdFromSession(ss) msg["Sid"] = ss.Id msg["Uid"] = ss.User msg["Role"] = ss.GetRole() WsBroadCastExceptMe(ss.Id, msg) } func WsNotifyLogout(ss *loan.Session) { msg := make(map[string]string) msg["T"] = "logout" msg["Mid"] = apiV1GetMachineIdFromSession(ss) msg["Uid"] = ss.User msg["Sid"] = ss.Id msg["Role"] = ss.GetRole() WsBroadCastExceptMe(ss.Id, msg) }