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>",
"UntappdFreq": 3600,
"UntappdChannels": [],
"TwitterConsumerKey": "<Consumer Key>",
"TwitterConsumerSecret": "<Consumer Secret>",

View File

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

View File

@ -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