commit 4e5cb61c1df4ec500d5d212bab92c5a4a7ab0f1a
parent 55cbe11683a5893d8f49947b6df1a598d90570bf
Author: Sébastien Marie <semarie@online.fr>
Date: Tue, 18 Jul 2023 09:40:32 +0000
!addfeed: use proper name for variable
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/main.go b/main.go
@@ -346,12 +346,12 @@ func main() {
c.Close()
}
if strings.HasPrefix(e.Last(), "!addfeed") {
- s := getParam(e.Last())
- if s == "" {
+ url := getParam(e.Last())
+ if url == "" {
return
}
- ss := append(viper.GetStringSlice("feeds.urls"), s)
- viper.Set("feeds.urls", ss)
+ feeds := append(viper.GetStringSlice("feeds.urls"), url)
+ viper.Set("feeds.urls", feeds)
c.Cmd.ReplyTo(e, girc.Fmt("feed {b}{green}added{c}{b}"))
if err := viper.WriteConfig(); err != nil {
c.Cmd.ReplyTo(e, girc.Fmt("adding feed {b}{red}failed{c}{b}"))