Fixes #46: Filter self out of user list

This commit is contained in:
Chris Sexton 2014-04-20 21:06:42 -04:00
parent 04839d5d2e
commit a07a6adc0d
1 changed files with 7 additions and 1 deletions

View File

@ -232,7 +232,13 @@ func (b *Bot) EventRecieved(conn *irc.Client, inMsg irc.Msg) {
} }
func (b *Bot) Who(channel string) []User { func (b *Bot) Who(channel string) []User {
return b.Users out := []User{}
for _, u := range b.Users {
if u.Name != b.Config.Nick {
out = append(out, u)
}
}
return out
} }
var rootIndex string = ` var rootIndex string = `