mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 16:50:30 +00:00
Add verbose IRC joins/parts (ident@host) (#805)
New configuration setting: VerboseJoinPart (default is false)
This commit is contained in:
parent
380c38674c
commit
6b47e29583
@ -120,7 +120,7 @@ type Protocol struct {
|
|||||||
ReplaceMessages [][]string // all protocols
|
ReplaceMessages [][]string // all protocols
|
||||||
ReplaceNicks [][]string // all protocols
|
ReplaceNicks [][]string // all protocols
|
||||||
RemoteNickFormat string // all protocols
|
RemoteNickFormat string // all protocols
|
||||||
RunCommands []string // irc
|
RunCommands []string // IRC
|
||||||
Server string // IRC,mattermost,XMPP,discord
|
Server string // IRC,mattermost,XMPP,discord
|
||||||
ShowJoinPart bool // all protocols
|
ShowJoinPart bool // all protocols
|
||||||
ShowTopicChange bool // slack
|
ShowTopicChange bool // slack
|
||||||
@ -141,6 +141,7 @@ type Protocol struct {
|
|||||||
UseFirstName bool // telegram
|
UseFirstName bool // telegram
|
||||||
UseUserName bool // discord
|
UseUserName bool // discord
|
||||||
UseInsecureURL bool // telegram
|
UseInsecureURL bool // telegram
|
||||||
|
VerboseJoinPart bool // IRC
|
||||||
WebhookBindAddress string // mattermost, slack
|
WebhookBindAddress string // mattermost, slack
|
||||||
WebhookURL string // mattermost, slack
|
WebhookURL string // mattermost, slack
|
||||||
}
|
}
|
||||||
|
@ -91,8 +91,13 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) {
|
|||||||
if b.GetBool("nosendjoinpart") {
|
if b.GetBool("nosendjoinpart") {
|
||||||
return
|
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}
|
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.Log.Debugf("<= Message is %#v", msg)
|
||||||
b.Remote <- msg
|
b.Remote <- msg
|
||||||
return
|
return
|
||||||
|
@ -157,6 +157,11 @@ RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
|
|||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
ShowJoinPart=false
|
ShowJoinPart=false
|
||||||
|
|
||||||
|
#Enable to show verbose users joins/parts (ident@host) from other bridges
|
||||||
|
#Currently works for messages from the following bridges: irc
|
||||||
|
#OPTIONAL (default false)
|
||||||
|
VerboseJoinPart=false
|
||||||
|
|
||||||
#Do not send joins/parts to other bridges
|
#Do not send joins/parts to other bridges
|
||||||
#Currently works for messages from the following bridges: irc, mattermost, slack
|
#Currently works for messages from the following bridges: irc, mattermost, slack
|
||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
|
Loading…
Reference in New Issue
Block a user