Esempio n. 1
0
func newEventPART(line string, user string, channel string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_PART
	event.Channel = channel
	event.User = user
	return event
}
Esempio n. 2
0
func newEventJOIN(line string, user string, channel string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_JOIN
	event.Channel = channel
	event.Data = channel
	event.User = user
	return event
}
Esempio n. 3
0
func newEventKICK(line string, user string, channel string, target string, msg string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_KICK
	event.Data = target
	event.Channel = channel
	event.User = user
	return event
}
Esempio n. 4
0
func newEventPRIVMSG(line string, user string, channel string, msg string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_PRIVMSG
	event.Data = msg
	if strings.Index(channel, "#") == 0 {
		event.Channel = channel
	}
	event.User = user
	return event
}