Activate beers only for certain channels (exclude control channel)

This commit is contained in:
Chris Sexton 2013-08-31 22:24:46 -04:00
parent 776d363595
commit 1a41358d64
3 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@
"UntappdToken": "<Your Token>", "UntappdToken": "<Your Token>",
"UntappdFreq": 3600, "UntappdFreq": 3600,
"UntappdChannels": [],
"TwitterConsumerKey": "<Consumer Key>", "TwitterConsumerKey": "<Consumer Key>",
"TwitterConsumerSecret": "<Consumer Secret>", "TwitterConsumerSecret": "<Consumer Secret>",

View File

@ -23,6 +23,7 @@ type Config struct {
HttpAddr string HttpAddr string
UntappdToken string UntappdToken string
UntappdFreq int UntappdFreq int
UntappdChannels []string
WelcomeMsgs []string WelcomeMsgs []string
TwitterConsumerKey string TwitterConsumerKey string
TwitterConsumerSecret string TwitterConsumerSecret string

View File

@ -29,7 +29,7 @@ func NewBeersPlugin(bot *bot.Bot) *BeersPlugin {
Bot: bot, Bot: bot,
} }
p.LoadData() p.LoadData()
for _, channel := range bot.Config.Channels { for _, channel := range bot.Config.UntappdChannels {
go p.untappdLoop(channel) go p.untappdLoop(channel)
} }
return &p return &p