From a07a6adc0d767b0bb2424ae63cf57946de6326f0 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sun, 20 Apr 2014 21:06:42 -0400 Subject: [PATCH] Fixes #46: Filter self out of user list --- bot/bot.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot/bot.go b/bot/bot.go index 700501b..df8c4c3 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -232,7 +232,13 @@ func (b *Bot) EventRecieved(conn *irc.Client, inMsg irc.Msg) { } 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 = `