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:
parent
d4d7fef313
commit
915a8fbad7
|
@ -243,9 +243,9 @@ func (gw *Gateway) ignoreMessage(msg *config.Message) bool {
|
||||||
func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) string {
|
func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) string {
|
||||||
br := gw.Bridges[msg.Account]
|
br := gw.Bridges[msg.Account]
|
||||||
msg.Protocol = br.Protocol
|
msg.Protocol = br.Protocol
|
||||||
nick := gw.Config.General.RemoteNickFormat
|
nick := dest.Config.RemoteNickFormat
|
||||||
if nick == "" {
|
if nick == "" {
|
||||||
nick = dest.Config.RemoteNickFormat
|
nick = gw.Config.General.RemoteNickFormat
|
||||||
}
|
}
|
||||||
if len(msg.Username) > 0 {
|
if len(msg.Username) > 0 {
|
||||||
// fix utf-8 issue #193
|
// fix utf-8 issue #193
|
||||||
|
|
|
@ -773,7 +773,7 @@ RemoteNickFormat="{NICK}"
|
||||||
###################################################################
|
###################################################################
|
||||||
#General configuration
|
#General configuration
|
||||||
###################################################################
|
###################################################################
|
||||||
#Settings here override specific settings for each protocol
|
# Settings here are defaults that each protocol can override
|
||||||
[general]
|
[general]
|
||||||
#RemoteNickFormat defines how remote users appear on this bridge
|
#RemoteNickFormat defines how remote users appear on this bridge
|
||||||
#The string "{NICK}" (case sensitive) will be replaced by the actual nick / username.
|
#The string "{NICK}" (case sensitive) will be replaced by the actual nick / username.
|
||||||
|
|
Loading…
Reference in New Issue