From 1a41358d64ea4743e0d9f20e63c4d710a28972a1 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sat, 31 Aug 2013 22:24:46 -0400 Subject: [PATCH] Activate beers only for certain channels (exclude control channel) --- config.json | 1 + config/config.go | 1 + plugins/beers.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index ecfd596..2890f7f 100644 --- a/config.json +++ b/config.json @@ -17,6 +17,7 @@ "UntappdToken": "", "UntappdFreq": 3600, + "UntappdChannels": [], "TwitterConsumerKey": "", "TwitterConsumerSecret": "", diff --git a/config/config.go b/config/config.go index 338016e..94e0f01 100644 --- a/config/config.go +++ b/config/config.go @@ -23,6 +23,7 @@ type Config struct { HttpAddr string UntappdToken string UntappdFreq int + UntappdChannels []string WelcomeMsgs []string TwitterConsumerKey string TwitterConsumerSecret string diff --git a/plugins/beers.go b/plugins/beers.go index 81326ec..2f12471 100644 --- a/plugins/beers.go +++ b/plugins/beers.go @@ -29,7 +29,7 @@ func NewBeersPlugin(bot *bot.Bot) *BeersPlugin { Bot: bot, } p.LoadData() - for _, channel := range bot.Config.Channels { + for _, channel := range bot.Config.UntappdChannels { go p.untappdLoop(channel) } return &p