예제 #1
0
파일: event.go 프로젝트: episeclab/gorobot
func newEventPING(line string, server string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_PING
	event.Data = server
	return event
}
예제 #2
0
파일: event.go 프로젝트: episeclab/gorobot
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
}
예제 #3
0
파일: event.go 프로젝트: episeclab/gorobot
func newEventNOTICE(line string, message string, cmd_id int) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_NOTICE
	event.Data = message
	event.CmdId = cmd_id
	return event
}
예제 #4
0
파일: event.go 프로젝트: episeclab/gorobot
func newEventNICK(line string, user string, newuser string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_NICK
	event.Data = newuser
	event.User = user
	return event
}
예제 #5
0
파일: event.go 프로젝트: episeclab/gorobot
func newEventQUIT(line string, user string, msg string) *api.Event {
	event := new(api.Event)
	event.Raw = line
	event.Type = api.E_QUIT
	event.Data = msg
	event.User = user
	return event
}
예제 #6
0
파일: event.go 프로젝트: episeclab/gorobot
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
}
예제 #7
0
파일: event.go 프로젝트: episeclab/gorobot
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
}
예제 #8
0
파일: event.go 프로젝트: episeclab/gorobot
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
}