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

package irc
import (
"github.com/gissleh/irc/isupport"
"github.com/gissleh/irc/list"
)
// ClientState is a serializable snapshot of the client's state.
type ClientState struct {
ID string `json:"id"`
Nick string `json:"nick"`
User string `json:"user"`
Host string `json:"host"`
Connected bool `json:"connected"`
Ready bool `json:"ready"`
Quit bool `json:"quit"`
ISupport *isupport.State `json:"isupport"`
Caps []string `json:"caps"`
Targets []ClientStateTarget `json:"targets"`
}
// ClientStateTarget is a part of the ClientState representing a target's state at the time of snapshot.
type ClientStateTarget struct {
ID string `json:"id"`
Kind string `json:"kind"`
Name string `json:"name"`
Users []list.User `json:"users,omitempty"`
}