diff --git a/main.go b/main.go index af8b168..fa9bb33 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ import ( "flokatirc/version" modfortune "flokatirc/modules/fortune" - modnews "flokatirc/modules/news" + modrss "flokatirc/modules/rss" modsaytime "flokatirc/modules/saytime" modsc "flokatirc/modules/sc" modstoll "flokatirc/modules/stoll" @@ -31,7 +31,7 @@ var ( channels = flag.String("chan", "#test", "Channels to join") nsname = flag.String("nsname", "NickServ", "NickServ name") nspass = flag.String("nspass", "", "NickServ password") - modules = flag.String("modules", "news,starcitizen,fortune,saytime", "Module list, comma separated") + modules = flag.String("modules", "rss,starcitizen,fortune,saytime", "Module list, comma separated") ) func init() { @@ -58,8 +58,8 @@ func main() { //TODO: implement more robust list parsing //XXX: this sucks - if strings.Contains(*modules, "news") { - go modnews.Init(sayCh, "newsfeeds.conf") + if strings.Contains(*modules, "rss") { + go modrss.Init(sayCh, "newsfeeds.conf") } if strings.Contains(*modules, "starcitizen") { go modsc.Init(sayCh) diff --git a/modules/news/news.go b/modules/rss/rss.go similarity index 94% rename from modules/news/news.go rename to modules/rss/rss.go index e2c4c59..d14bc19 100644 --- a/modules/news/news.go +++ b/modules/rss/rss.go @@ -4,7 +4,7 @@ // and is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication // license. -package news +package rss import ( "bufio" @@ -64,7 +64,7 @@ func itemHandler(feed *rss.Feed, ch *rss.Channel, newitems []*rss.Item) { return } for _, ni := range newitems { - sayCh <- fmt.Sprintf("%s\n*** [NEWS] %v - %v", "*", ni.Title, ni.Links[0].Href) + sayCh <- fmt.Sprintf("%s\n*** [RSS] %v - %v", "*", ni.Title, ni.Links[0].Href) } }