gruik

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

commit 6f7b49330da530b1b8a285d93e17b3e523ffaca7
parent 167eed43e004013c8fa3e4f934dd8cfad16b0e4d
Author: Emile "iMil" Heitor <imil@netbsd.org>
Date:   Sun, 26 May 2024 18:07:17 +0000

Merge branch 'sasl-optional' into 'main'

Make SASL optional

See merge request gcu-squad/gruik!5
Diffstat:
Mmain.go | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go @@ -207,6 +207,7 @@ func confDefault() { "irc.server": "irc.libera.chat", "irc.nick": "gruik", "irc.channel": "goaste", + "irc.sasl": true, "irc.xchannels": []string{"goaste2"}, "irc.debug": false, "irc.dry": false, @@ -285,10 +286,15 @@ func main() { AllowFlood: true, }) if len(password) > 0 { - client.Config.SASL = &girc.SASLPlain{ - User: user, - Pass: password, + if viper.GetBool("irc.sasl") == true { + client.Config.SASL = &girc.SASLPlain{ + User: user, + Pass: password, + } + } else { + client.Config.ServerPass = password } + } client.Handlers.Add(girc.CONNECTED, func(c *girc.Client, e girc.Event) {