Skip to content

Commit

Permalink
Add option to only show messages in joined channels, nothing in &mess…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
hloeung committed Oct 28, 2023
1 parent 753f26e commit 99de977
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion matterircd.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PasteBufferTimeout = 2500
Insecure = false

#ignore the Mattermost server version when checking if supported
#ignoreserverversion = false
#IgnoreServerVersion = false

#an array of channels that only will be joined on IRC. JoinExlude and JoinInclude will not be checked
#regexp is supported
Expand Down Expand Up @@ -83,6 +83,9 @@ Insecure = false
#
#JoinInclude = ["#devops","#myteam-marketing"]

#show only messages for channels joined, so nothing in the &messages channel.
#ShowOnlyJoined = false

#PartFake: a bool that defines if you do a /LEAVE or /PART on IRC it will also
#actually leave the channel on mattermost.
#if false it actually leaves the channel on mattermost
Expand Down Expand Up @@ -224,6 +227,9 @@ UseDisplayName = false
#
#JoinInclude = ["#devops","#myteam-marketing"]

#show only messages for channels joined, so nothing in the &messages channel.
#ShowOnlyJoined = false

#This will add a number between 000 and fff to each message
#This number will be referenced when a message is edited/deleted/threaded/reaction
PrefixContext = false
Expand Down
3 changes: 3 additions & 0 deletions mm-go-irckit/userbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ func (u *User) handleChannelMessageEvent(event *bridge.ChannelMessageEvent) {
}

if event.ChannelType != "D" && ch.ID() == "&messages" {
if u.v.GetBool(u.br.Protocol() + ".showonlyjoined") {
return
}
nick += "/" + u.Srv.Channel(event.ChannelID).String()
}

Expand Down

0 comments on commit 99de977

Please sign in to comment.