Making downtime also remove reference to self

This commit is contained in:
Chris Sexton 2013-01-29 16:29:07 -05:00
parent 18dcb5884d
commit 1e32fbf5ea
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ func (p *DowntimePlugin) Message(message bot.Message) bool {
tops := "The top entries are: " tops := "The top entries are: "
for _, e := range entries { for _, e := range entries {
// filter out ZNC entries // filter out ZNC entries and ourself
if strings.HasPrefix(e.Nick, "*") { if strings.HasPrefix(e.Nick, "*") || strings.ToLower(p.Bot.Config.Nick) == e.Nick {
p.remove(e.Nick) p.remove(e.Nick)
} else { } else {
tops = fmt.Sprintf("%s%s: %s ", tops, e.Nick, time.Now().Sub(e.LastSeen)) tops = fmt.Sprintf("%s%s: %s ", tops, e.Nick, time.Now().Sub(e.LastSeen))