5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 03:25:40 +00:00

Add support for RemoteNickFormat in general configuration (samechannelgateway)

This commit is contained in:
Wim 2016-11-20 23:50:12 +01:00
parent e1641b2c2e
commit 2e54b97fc2

View File

@ -73,7 +73,10 @@ func (gw *SameChannelGateway) handleMessage(msg config.Message, dest *bridge.Bri
func (gw *SameChannelGateway) modifyUsername(msg *config.Message, dest *bridge.Bridge) {
br := gw.Bridges[msg.Account]
nick := dest.Config.RemoteNickFormat
nick := gw.Config.General.RemoteNickFormat
if nick == "" {
nick = dest.Config.RemoteNickFormat
}
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
nick = strings.Replace(nick, "{BRIDGE}", br.Name, -1)
nick = strings.Replace(nick, "{PROTOCOL}", br.Protocol, -1)