예제 #1
0
파일: seen.go 프로젝트: gundalow/sp0rkle
func SawNick(nick bot.Nick, ch bot.Chan, act, txt string) *Nick {
	return &Nick{
		Nick:      nick,
		Chan:      ch,
		OtherNick: "",
		Timestamp: time.Now(),
		Key:       nick.Lower(),
		Action:    act,
		Text:      txt,
	}
}
예제 #2
0
func NewTell(msg string, t, n bot.Nick, c bot.Chan) *Reminder {
	return &Reminder{
		Chan:     c,
		Source:   n,
		Target:   t,
		From:     n.Lower(),
		To:       t.Lower(),
		Reminder: msg,
		Created:  time.Now(),
		Tell:     true,
		Id:       bson.NewObjectId(),
	}
}
예제 #3
0
func NewReminder(r string, at time.Time, t, n bot.Nick, c bot.Chan) *Reminder {
	return &Reminder{
		Source:   n,
		Target:   t,
		Chan:     c,
		From:     n.Lower(),
		To:       t.Lower(),
		Reminder: r,
		Created:  time.Now(),
		RemindAt: at,
		Tell:     false,
		Id:       bson.NewObjectId(),
	}
}