Mirror of github.com/gissleh/irc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
926 B

  1. package irc
  2. import (
  3. "github.com/gissleh/irc/isupport"
  4. "github.com/gissleh/irc/list"
  5. )
  6. // ClientState is a serializable snapshot of the client's state.
  7. type ClientState struct {
  8. ID string `json:"id"`
  9. Nick string `json:"nick"`
  10. User string `json:"user"`
  11. Host string `json:"host"`
  12. Connected bool `json:"connected"`
  13. Ready bool `json:"ready"`
  14. Quit bool `json:"quit"`
  15. ISupport *isupport.State `json:"isupport"`
  16. Caps []string `json:"caps"`
  17. Targets []ClientStateTarget `json:"targets"`
  18. }
  19. // ClientStateTarget is a part of the ClientState representing a target's state at the time of snapshot.
  20. type ClientStateTarget struct {
  21. ID string `json:"id"`
  22. Kind string `json:"kind"`
  23. Name string `json:"name"`
  24. Users []list.User `json:"users,omitempty"`
  25. }