master sewn/kohai / irc / events.go
  1package irc
  2
  3import "time"
  4
  5type Event interface{}
  6
  7type InfoEvent struct {
  8	Prefix  string
  9	Message string
 10}
 11
 12type ErrorEvent struct {
 13	Severity Severity
 14	Code     string
 15	Message  string
 16}
 17
 18type RegisteredEvent struct{}
 19
 20type SelfNickEvent struct {
 21	FormerNick string
 22}
 23
 24type UserNickEvent struct {
 25	User       string
 26	FormerNick string
 27	Time       time.Time
 28}
 29
 30type SelfJoinEvent struct {
 31	Channel   string
 32	Requested bool // whether we recently requested to join that channel
 33	Topic     string
 34	Read      time.Time
 35}
 36
 37type UserJoinEvent struct {
 38	User    string
 39	Channel string
 40	Time    time.Time
 41}
 42
 43type SelfPartEvent struct {
 44	Channel string
 45}
 46
 47type UserPartEvent struct {
 48	User    string
 49	Channel string
 50	Time    time.Time
 51	Message string
 52	Who     string
 53}
 54
 55type UserQuitEvent struct {
 56	User     string
 57	Channels []string
 58	Time     time.Time
 59	Message  string
 60}
 61
 62type UserOnlineEvent struct {
 63	User string
 64}
 65
 66type UserOfflineEvent struct {
 67	User string
 68}
 69
 70type TopicChangeEvent struct {
 71	Channel string
 72	Topic   string
 73	Time    time.Time
 74	Who     string
 75}
 76
 77type ModeChangeEvent struct {
 78	Channel string
 79	Mode    string
 80	Time    time.Time
 81	Who     string
 82}
 83
 84type InviteEvent struct {
 85	Inviter string
 86	Invitee string
 87	Channel string
 88}
 89
 90type MessageEvent struct {
 91	ID              string
 92	ReplyTo         string
 93	User            string
 94	Target          string
 95	TargetIsChannel bool
 96	TargetPrefix    string
 97	Command         string
 98	Content         string
 99	Time            time.Time
100}
101
102type ReactEvent struct {
103	ID      string
104	User    string
105	Target  string
106	Removal bool
107	React   string
108}
109
110type ListItem struct {
111	Channel string
112	Count   string
113	Topic   string
114}
115
116type ListEvent []ListItem
117
118type HistoryEvent struct {
119	Target   string
120	Messages []Event
121	End      bool
122}
123
124type HistoryTargetsEvent struct {
125	Targets map[string]time.Time
126}
127
128type ReadEvent struct {
129	Target    string
130	Timestamp time.Time
131}
132
133type SearchEvent struct {
134	Messages []MessageEvent
135}
136
137type MetadataChangeEvent struct {
138	Target string
139	Pinned bool
140	Muted  bool
141}
142
143type BouncerNetworkEvent struct {
144	ID     string
145	Name   string
146	Delete bool
147}