5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-09 16:50:30 +00:00

Make [general] settings default, not total override (specifically RemoteNickFormat) (#279)

* Use general settings as default, that specific protocols override.

* Fixed tab formatting.

* Clarified override precedence of [general] config.
This commit is contained in:
Patrick Connolly 2017-10-20 14:58:39 -04:00 committed by Wim
parent d4d7fef313
commit 915a8fbad7
2 changed files with 3 additions and 3 deletions

View File

@ -243,9 +243,9 @@ func (gw *Gateway) ignoreMessage(msg *config.Message) bool {
func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) string {
br := gw.Bridges[msg.Account]
msg.Protocol = br.Protocol
nick := gw.Config.General.RemoteNickFormat
nick := dest.Config.RemoteNickFormat
if nick == "" {
nick = dest.Config.RemoteNickFormat
nick = gw.Config.General.RemoteNickFormat
}
if len(msg.Username) > 0 {
// fix utf-8 issue #193

View File

@ -773,7 +773,7 @@ RemoteNickFormat="{NICK}"
###################################################################
#General configuration
###################################################################
#Settings here override specific settings for each protocol
# Settings here are defaults that each protocol can override
[general]
#RemoteNickFormat defines how remote users appear on this bridge
#The string "{NICK}" (case sensitive) will be replaced by the actual nick / username.