Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

26 lignes
538B

  1. package main
  2. import "biukop.com/sfm/loan"
  3. func WsNotifyNewLogin(ss *loan.Session) {
  4. msg := make(map[string]string)
  5. msg["T"] = "login"
  6. msg["Mid"] = apiV1GetMachineIdFromSession(ss)
  7. msg["Sid"] = ss.Id
  8. msg["Uid"] = ss.User
  9. msg["Role"] = ss.GetRole()
  10. WsBroadCastExceptMe(ss.Id, msg)
  11. }
  12. func WsNotifyLogout(ss *loan.Session) {
  13. msg := make(map[string]string)
  14. msg["T"] = "logout"
  15. msg["Mid"] = apiV1GetMachineIdFromSession(ss)
  16. msg["Uid"] = ss.User
  17. msg["Sid"] = ss.Id
  18. msg["Role"] = ss.GetRole()
  19. WsBroadCastExceptMe(ss.Id, msg)
  20. }