Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit d38797192262f18c1513d89dc2017fc4d2434c8d Author: Patrick Connolly <patrick.c.connolly@gmail.com> Date: Fri Oct 20 14:58:39 2017 +0000 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. diff --git a/gateway/gateway.go b/gateway/gateway.go index 663c387..06eec56 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -2439 +2439 @@ 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 diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index 81bf1cc..3586977 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -7737 +7737 @@ 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.