summaryrefslogtreecommitdiff
path: root/rss.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-12-20 23:58:49 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-12-20 23:58:49 +0100
commit44b2a071555235d8e7c1d64d85541ade50527e3b (patch)
tree5f53d6bc722ccddcb3483ba814facfb5ab85171b /rss.go
parentc2eaea7276945057ac18b31d06b79a6326932b57 (diff)
news watcher
Diffstat (limited to 'rss.go')
-rw-r--r--rss.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/rss.go b/rss.go
index f79efe7..741b81d 100644
--- a/rss.go
+++ b/rss.go
@@ -6,7 +6,6 @@ import (
"time"
"dim13.org/rss"
- irc "github.com/fluffle/goirc/client"
)
type Feed struct {
@@ -107,14 +106,12 @@ func (f Feed) Watch(news chan News) {
}
}
-func WatchNews(conn *irc.Conn, room string) {
+func watchNews(msg chan string) {
news := make(chan News)
-
- for _, f := range Feeds {
- go f.Watch(news)
+ for _, feed := range Feeds {
+ go feed.Watch(news)
}
-
for n := range news {
- conn.Notice(room, n.String())
+ msg <- fmt.Sprint(n)
}
}