Rename news -> rss.

This commit is contained in:
Andreas Neue 2016-01-22 22:32:49 +01:00
parent 3a93c6324a
commit 0674ac6d87
2 changed files with 6 additions and 6 deletions

View File

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

View File

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