gruik

Fork of GCU-Squad's RSS-to-IRC bridge
git clone https://git.instinctive.eu/gruik.git
Log | Files | Refs | README | LICENSE

commit 06458d341c8463a0550f3358e4cd7a9c5ebca6fa
parent 1e632af6642fd57c02af84a76319414084306de1
Author: Sébastien Marie <semarie@online.fr>
Date:   Tue, 18 Jul 2023 09:09:47 +0000

!xpost: use proper name for variable

Diffstat:
Mmain.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go @@ -278,11 +278,11 @@ func main() { } } if strings.HasPrefix(e.Last(), "!xpost") && e.Params[0] == channel { - s := getParam(e.Last()) - if s == "" { + requestedHash := getParam(e.Last()) + if requestedHash == "" { return } - if news := getNewsByHash(s); news.Hash != "" { + if news := getNewsByHash(requestedHash); news.Hash != "" { post := fmt.Sprintf(" {r}(from %s on %s)", e.Source.Name, channel) message := fmtNews(news) + girc.Fmt(post) for _, xchan := range viper.GetStringSlice("irc.xchannels") {