aboutsummaryrefslogtreecommitdiffstats
path: root/rss.go
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-11-04 18:43:06 +0000
committerterminaldweller <devi@terminaldweller.com>2024-11-04 18:43:06 +0000
commitdb0110393f70987c9b87643594d18df935ef91d5 (patch)
treeb61219f1d4238f4b5ad1d3d2b4d8d611115a0f11 /rss.go
parentadded openrouter as a provider (diff)
downloadmilla-db0110393f70987c9b87643594d18df935ef91d5.tar.gz
milla-db0110393f70987c9b87643594d18df935ef91d5.zip
added the ability to use channels with password, fixes 35
Diffstat (limited to 'rss.go')
-rw-r--r--rss.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/rss.go b/rss.go
index 60a8066..2c34459 100644
--- a/rss.go
+++ b/rss.go
@@ -21,7 +21,8 @@ import (
func GetFeed(feed FeedConfig,
client *girc.Client,
pool *pgxpool.Pool,
- channel, groupName string,
+ channel []string,
+ groupName string,
) {
rowName := groupName + "__" + feed.Name + "__"
@@ -55,7 +56,7 @@ func GetFeed(feed FeedConfig,
for _, item := range parsedFeed.Items {
if item.PublishedParsed.Unix() > newestFromDB {
- client.Cmd.Message(channel, parsedFeed.Title+": "+item.Title+">>>"+item.Link)
+ client.Cmd.Message(channel[0], parsedFeed.Title+": "+item.Title+">>>"+item.Link)
}
}
@@ -77,7 +78,8 @@ func feedDispatcher(
config RSSConfig,
client *girc.Client,
pool *pgxpool.Pool,
- channel, groupName string,
+ channel []string,
+ groupName string,
period int,
) {
for {
@@ -164,7 +166,7 @@ func runRSS(appConfig *TomlConfig, client *girc.Client) {
for groupName, rss := range appConfig.Rss {
log.Print("RSS: joining ", rss.Channel)
- client.Cmd.Join(rss.Channel)
+ IrcJoin(client, rss.Channel)
rssConfig := ParseRSSConfig(rss.RssFile)
if rssConfig == nil {
log.Print("Could not parse RSS config file " + rss.RssFile + ". Exiting.")