mqttim

MQTT ↔ Instant Messaging Bridge
git clone https://git.instinctive.eu/mqttim.git
Log | Files | Refs | README | LICENSE

commit d6a91feabbd2e63a4199797f9beb0a62f61ab83b
parent 189066d6f239ddae37e7a7c2d2acb8e0e75cf45f
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Fri, 17 Jan 2025 19:11:36 +0000

Verbosity of IRC client is configurable
Diffstat:
Mmain.go | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/main.go b/main.go @@ -23,6 +23,7 @@ type IrcConfig struct { MaxLine int ContSuffix string ContPrefix string + Verbose bool } type MqttConfig struct { @@ -84,8 +85,10 @@ func main() { go m.Subscribe(nil, "#") i := irc.IRC(config.Irc.Nick, "mqttim") -// i.VerboseCallbackHandler = true -// i.Debug = true + if config.Irc.Verbose { + i.VerboseCallbackHandler = true + i.Debug = true + } i.AddCallback("001", func(e *irc.Event) { i.Join(config.Irc.Channel) }) i.AddCallback("366", func(e *irc.Event) {}) i.AddCallback("PRIVMSG", func(e *irc.Event) {