Пример #1
0
func NewTell(msg string, t, n base.Nick, c base.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(),
	}
}
Пример #2
0
func SawNick(nick base.Nick, ch base.Chan, act, txt string) *Nick {
	return &Nick{
		Nick:      nick,
		Chan:      ch,
		OtherNick: "",
		Timestamp: time.Now(),
		Key:       nick.Lower(),
		Action:    act,
		Text:      txt,
		Lines:     0,
		//		Id:           bson.NewObjectId(),
	}
}
Пример #3
0
func NewReminder(r string, at time.Time, t, n base.Nick, c base.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(),
	}
}