Example #1
0
func (b *bot) Who(channel string) []user.User {
	names := b.conn.Who(channel)
	users := []user.User{}
	for _, n := range names {
		users = append(users, user.New(n))
	}
	return users
}
Example #2
0
func (p *BabblerPlugin) makeBabblers(newUser user.User) {
	users := p.Bot.Who(p.config.MainChannel)
	users = append(users, newUser)
	for _, name := range p.config.Babbler.DefaultUsers {
		users = append(users, user.New(name))
	}
	for _, u := range users {
		p.makeBabbler(u)
	}
}