diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-07-24 12:57:19 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-07-24 12:57:19 +0200 |
commit | 978f9030b44c2ff04623a28227bf3c806ebbf051 (patch) | |
tree | fbdaff8c29c3377523fa60d2755d607f0ad0db21 /rss.go | |
parent | e978813299c9c8e6d67c570279bc56f217aa4454 (diff) |
Prepare for auto-fetcher
Diffstat (limited to 'rss.go')
-rw-r--r-- | rss.go | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -7,6 +7,14 @@ import ( irc "github.com/fluffle/goirc/client" ) +var Feed = map[string]string{ + "News": `https://www.linux.org.ru/section-rss.jsp?section=1`, + "Forum": `https://www.linux.org.ru/section-rss.jsp?section=2`, + "Gallery": `https://www.linux.org.ru/section-rss.jsp?section=3`, + "OpenNET": `http://www.opennet.ru/opennews/opennews_all_noadv.rss`, + "Undeadly": `http://undeadly.org/cgi?action=rss`, +} + type RSS struct{ Command } func (v RSS) Handle(conn *irc.Conn, line *irc.Line) { @@ -28,31 +36,31 @@ func init() { Register("news", &RSS{ Command{ Help: "LOR news (msg private to see all)", - Arg: `https://www.linux.org.ru/section-rss.jsp?section=1`, + Arg: Feed["News"], }, }) Register("forum", &RSS{ Command{ Help: "LOR forum (msg private to see all)", - Arg: `https://www.linux.org.ru/section-rss.jsp?section=2`, + Arg: Feed["Forum"], }, }) Register("gallery", &RSS{ Command{ Help: "LOR gallery (msg private to see all)", - Arg: `https://www.linux.org.ru/section-rss.jsp?section=3`, + Arg: Feed["Gallery"], }, }) Register("bsd", &RSS{ Command{ Help: "Undeadly news (msg private to see all)", - Arg: `http://undeadly.org/cgi?action=rss`, + Arg: Feed["Undeadly"], }, }) Register("opennet", &RSS{ Command{ Help: "OpenNET news (msg private to see all)", - Arg: `http://www.opennet.ru/opennews/opennews_all_noadv.rss`, + Arg: Feed["OpenNET"], }, }) } |