From 6b47e295836254b8de8da384db5263fc3ef14362 Mon Sep 17 00:00:00 2001 From: chotaire Date: Thu, 18 Apr 2019 23:56:05 +0200 Subject: Add verbose IRC joins/parts (ident@host) (#805) New configuration setting: VerboseJoinPart (default is false) --- bridge/irc/handlers.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bridge/irc/handlers.go') diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go index 1d260071..f0e54928 100644 --- a/bridge/irc/handlers.go +++ b/bridge/irc/handlers.go @@ -91,8 +91,13 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) { if b.GetBool("nosendjoinpart") { return } - b.Log.Debugf("<= Sending JOIN_LEAVE event from %s to gateway", b.Account) msg := config.Message{Username: "system", Text: event.Source.Name + " " + strings.ToLower(event.Command) + "s", Channel: channel, Account: b.Account, Event: config.EventJoinLeave} + if b.GetBool("verbosejoinpart") { + b.Log.Debugf("<= Sending verbose JOIN_LEAVE event from %s to gateway", b.Account) + msg = config.Message{Username: "system", Text: event.Source.Name + " (" + event.Source.Ident + "@" + event.Source.Host + ") " + strings.ToLower(event.Command) + "s", Channel: channel, Account: b.Account, Event: config.EventJoinLeave} + } else { + b.Log.Debugf("<= Sending JOIN_LEAVE event from %s to gateway", b.Account) + } b.Log.Debugf("<= Message is %#v", msg) b.Remote <- msg return -- cgit v1.2.3